public void Setup()
        {
            var options = new DbContextOptionsBuilder <PaymentsDb>()
                          .UseInMemoryDatabase(databaseName: "Payments")
                          .Options;

            _context = new PaymentsDb(options);
            _mapper  = MapperUtils.GetMapper(new Profile[] { new DomainToInfra(), new InfraToDomain() });
        }
示例#2
0
 public PaymentsRepository(PaymentsDb context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }