18 lines
No EOL
490 B
C#
18 lines
No EOL
490 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace Geekbot.net.Database
|
|
{
|
|
public class InMemoryDatabase : DatabaseContext
|
|
{
|
|
private readonly string _name;
|
|
|
|
public InMemoryDatabase(string name)
|
|
{
|
|
_name = name;
|
|
}
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
=> optionsBuilder.UseInMemoryDatabase(databaseName: _name);
|
|
}
|
|
} |