mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-07-20 04:22:51 +01:00
18 lines
400 B
C#
18 lines
400 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
using Tgstation.Server.Host.Database;
|
|
|
|
namespace Tgstation.Server.Host.Tests
|
|
{
|
|
static class Utils
|
|
{
|
|
public static MemoryDatabaseContext CreateDatabaseContext()
|
|
{
|
|
var options = new DbContextOptionsBuilder<MemoryDatabaseContext>()
|
|
.UseInMemoryDatabase(databaseName: "TgsTestDB")
|
|
.Options;
|
|
return new MemoryDatabaseContext(options);
|
|
}
|
|
}
|
|
}
|