public static RequestServiceDbContext Create()
        {
            var options = new DbContextOptionsBuilder <RequestServiceDbContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString())
                          .Options;

            var context = new RequestServiceDbContext(options);

            context.Database.EnsureCreated();

            context.Answers.AddRange(new Answer());

            return(null);
        }
Пример #2
0
 public static void InitializeDbForTests(RequestServiceDbContext context)
 {
     OrdsomeInitializer.Initialize(context);
 }