public AppDemoDataFixture()
        {
            var options = new DbContextOptionsBuilder <AppDemoContext>()
                          .UseInMemoryDatabase("AppDemoInMemoryContext")
                          .Options;

            InMemoryDbContext = new AppDemoContext(options);

            InMemoryDbContext.Database.EnsureDeleted();
            InMemoryDbContext.Database.EnsureCreated();

            InMemoryDbContext.SaveChanges();
        }
Esempio n. 2
0
 public ContactService(AppDemoContext context) : base(context)
 {
 }
Esempio n. 3
0
 public Repository(AppDemoContext context)
 {
     _context = context;
 }