public AddressControllerTest() { _dbOptions = new DbContextOptionsBuilder <AddressContext>() .UseInMemoryDatabase(databaseName: "in-memory") .Options; using (var dbContext = new AddressContext(_dbOptions)) { dbContext.AddRange(AddressContextDbSeed.GetData()); dbContext.SaveChanges(); } }