public PrestamAppDbContext GetDbContext(bool useSqlLite = false) { var builder = new DbContextOptionsBuilder <PrestamAppDbContext>(); if (useSqlLite) { builder.UseSqlite("DataSource=:memory:", x => { }); } else { builder.UseInMemoryDatabase(Guid.NewGuid().ToString()); } var dbContext = new PrestamAppDbContext(builder.Options); if (useSqlLite) { // SQLite needs to open connection to the DB. // Not required for in-memory-database. dbContext.Database.OpenConnection(); } dbContext.Database.EnsureCreated(); return(dbContext); }
public GetContactDetailQueryHandler(PrestamAppDbContext context) { _context = context; }
public DeleteZoneCommandHandler(PrestamAppDbContext context) { _context = context; }
public GetCollectorListQueryHandler(PrestamAppDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public GetZonesListQueryHandlerTests(QueryTestFixture fixture) { _context = fixture.Context; _mapper = fixture.Mapper; }
public CommandTestBase() { Context = PrestamAppContextFactory.Create(); }
public CreateLoanWithDuesCommandHandler(PrestamAppDbContext context) { _context = context; }
public CreatePersonalRefferenceCommandHandler(PrestamAppDbContext context) { _context = context; }
public GetAddressTypeListQueryHandler(PrestamAppDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public GetTimeFrameListQueryHandler(PrestamAppDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public DeleteCollectorCommandHandler(PrestamAppDbContext context) { _context = context; }
public CreateContactCommandHandler(PrestamAppDbContext context) { _context = context; }