2018-05-09 18:51:53 +02:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace Geekbot.net.Database
|
|
|
|
|
{
|
|
|
|
|
public class InMemoryDatabase : DatabaseContext
|
|
|
|
|
{
|
|
|
|
|
private readonly string _name;
|
|
|
|
|
|
|
|
|
|
public InMemoryDatabase(string name)
|
|
|
|
|
{
|
|
|
|
|
_name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
2018-05-15 01:18:26 +02:00
|
|
|
|
=> optionsBuilder.UseInMemoryDatabase(_name);
|
2018-05-09 18:51:53 +02:00
|
|
|
|
}
|
|
|
|
|
}
|