18 lines
467 B
C#
18 lines
467 B
C#
using ManagerService.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ManagerService.Tests.Infrastructure
|
|
{
|
|
public static class DbContextFactory
|
|
{
|
|
public static MyInfoMateDbContext Create()
|
|
{
|
|
var options = new DbContextOptionsBuilder<MyInfoMateDbContext>()
|
|
.UseInMemoryDatabase(System.Guid.NewGuid().ToString())
|
|
.Options;
|
|
|
|
return new MyInfoMateDbContext(options);
|
|
}
|
|
}
|
|
}
|