示例#1
0
 public ProductRepository(
     IRepositoryCRUD repository,
     IUnityOfWork repositoryChanges)
 {
     _repository        = repository;
     _repositoryChanges = repositoryChanges;
 }
 public ProductRepository(
     IRepositoryCRUD repository,
     IUnityOfWork repositoryChanges,
     IMessagePublisher serviceBus)
 {
     _repository        = repository;
     _repositoryChanges = repositoryChanges;
     _serviceBus        = serviceBus;
 }
示例#3
0
 public IRepositoryCRUD <T> GetRepositoryCRUD <T>()
 {
     if (typeof(T) == typeof(OrderedProduct))
     {
         return((IRepositoryCRUD <T>)orderedProductRepo ?? ((orderedProductRepo = new OrderedProductRepo()) as IRepositoryCRUD <T>));
     }
     if (typeof(T) == typeof(Order))
     {
         return((IRepositoryCRUD <T>)orderRepo ?? ((orderRepo = new OrderRepo()) as IRepositoryCRUD <T>));
     }
     if (typeof(T) == typeof(User))
     {
         return((IRepositoryCRUD <T>)userRepo ?? ((userRepo = new UserRepo()) as IRepositoryCRUD <T>));
     }
     else
     {
         throw new Exception("No repository");
     }
 }
示例#4
0
 public CountyController(IRepositoryCRUD repo, IMapper mapper)
 {
     _repo   = repo;
     _mapper = mapper;
 }
 public ProductDetailsController(IProductDetailsRepo product, IWebHostEnvironment hostEnvironment, IRepositoryCRUD <MobileBrand> brand)
 {
     _brand             = brand;
     _product           = product;
     webHostEnvironment = hostEnvironment;
 }
 public ValuesController(IRepositoryCRUD repo)
 {
     _repo = repo;
 }
 public MobileBrandController(IRepositoryCRUD <MobileBrand> brand)
 {
     _brand = brand;
 }
 public ServiceController(IRepositoryCRUD repo)
 {
     _repo = repo;
 }
示例#9
0
 public CarServices(IRepositoryCRUD <Cars> _carsRepository)
 {
     carsRepository = _carsRepository;
 }
 public ProductDetailsController(IRepositoryCRUD <ProductDetails> product)
 {
     _product = product;
 }