public void Setup() { _options = new DbContextOptionsBuilder <PayerDataContext>() .UseInMemoryDatabase(databaseName: "myPayers") .Options; _context = new PayerDataContext(_options); _repository = new PayerRepository(_context); }
public void Setup() { _options = new DbContextOptionsBuilder <PayerDataContext>() .UseInMemoryDatabase(databaseName: "myPayers") .Options; _context = new PayerDataContext(_options); _repsoitory = new PayerRepository(_context); var mappingProfile = new MappingProfile(); var configuration = new MapperConfiguration(c => c.AddProfile(mappingProfile)); _mapper = new Mapper(configuration); _controller = new PayersController(_repsoitory, _mapper); }
public PayerRepository(PayerDataContext context) { _context = context; BuildInMemoryData(); }