public static void SeedCarProduct(ICarProductRepository repository)
 {
     repository.AddAsync(new CarProduct()
     {
         CarId = 1, Brand = "Toyota", Series = "Prius", Nickname = "New Prius 2020"
     }).Wait();
     repository.AddAsync(new CarProduct()
     {
         CarId = 2, Brand = "Mercedes benz", Series = "C-Class", Nickname = "C-Class Saloon"
     }).Wait();
     repository.AddAsync(new CarProduct()
     {
         CarId = 3, Brand = "BMW", Series = "i8", Nickname = "i8 Roadster"
     }).Wait();
 }
Beispiel #2
0
 public CreateCarProductCommandHandler(ICarProductRepository carProductRepository, IMapper mapper)
 {
     _carProductRepository = carProductRepository;
     _mapper = mapper;
 }
 public GetCarQueryHandler(ICarProductRepository carProductRepository, IMapper mapper)
 {
     _carProductRepository = carProductRepository;
     _mapper = mapper;
 }