public DatbaseServiceTests() { //Initiallize Database Context DbContextOptions <CarSaleCodeChallengeContext> options; var builder = new DbContextOptionsBuilder <CarSaleCodeChallengeContext>(); builder.UseInMemoryDatabase(ContextName); options = builder.Options; var context = new CarSaleCodeChallengeContext(options); _service = new VehicleDataService(context, _mapper); }
public VehicleDataService(CarSaleCodeChallengeContext context, IMapper mapper) { _context = context; }