public void Setup()
        {
            _options = new DbContextOptionsBuilder <PayerDataContext>()
                       .UseInMemoryDatabase(databaseName: "myPayers")
                       .Options;

            _context    = new PayerDataContext(_options);
            _repository = new PayerRepository(_context);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public PayerRepository(PayerDataContext context)
 {
     _context = context;
     BuildInMemoryData();
 }