Example #1
0
 /// <summary>
 /// Initialization of all repositories
 /// </summary>
 public CustomerService(IRepository <Customer> repository)
 {
     this.customerRepository = repository ?? throw new ArgumentNullException(nameof(repository));
     this.upMapper           = new RepositoryToServiceMapper();
 }
Example #2
0
 /// <summary>
 /// Initialization of all repositories
 /// </summary>
 public OrderItemService(IRepository <OrderItem> repositoryOrderItem, IRepository <Product> repositoryProduct)
 {
     this.orderItemRepository = repositoryOrderItem ?? throw new ArgumentNullException(nameof(repositoryOrderItem));
     this.productRepository   = repositoryProduct ?? throw new ArgumentNullException(nameof(repositoryProduct));
     this.upMapper            = new RepositoryToServiceMapper();
 }
Example #3
0
 /// <summary>
 /// Initialization of all repositories
 /// </summary>
 public OrderService(IRepository <Order> orders)
 {
     this.orderRepository = orders ?? throw new ArgumentNullException(nameof(orders));
     this.upMapper        = new RepositoryToServiceMapper();
 }
Example #4
0
 /// <summary>
 /// Initialization of all repositories
 /// </summary>
 public ProductService(IRepository <Product> products)
 {
     this.productRepository = products ?? throw new ArgumentNullException(nameof(products));
     this.upMapper          = new RepositoryToServiceMapper();
 }
 public CustomerServiceStub()
 {
     this.mapper = new RepositoryToServiceMapper();
 }