Exemple #1
0
        public ServiceListControllerTest()
        {
            _dbOptions = new DbContextOptionsBuilder <ServiceListContext>()
                         .UseInMemoryDatabase(databaseName: "service-list-in-memory")
                         .Options;

            using (var dbContext = new ServiceListContext(_dbOptions))
            {
                dbContext.AddRange(GetServiceListItems());
                dbContext.SaveChanges();
            }
        }