public ReviewsController( IProductsDataService productsData, IReviewsDataService reviewsData) { this.productsData = productsData; this.reviewsData = reviewsData; }
/// <summary> /// Validate Product Update /// </summary> /// <param name="product"></param> /// <param name="dataService"></param> public void ValidateProductUpdate(Product product, IProductsDataService dataService) { productsDataService = dataService; InitializeValidationRules(product); ValidateRequired("ProductCode", "Product Code"); ValidateRequired("Description", "Description"); ValidateRequired("UnitOfMeasure", "UnitOfMeasure"); ValidateDecimalIsNotZero("UnitPrice", "Unit Price"); ValidateDecimalGreaterThanZero("UnitPrice", "Unit Price"); ValidateUniqueProductCode(product.ProductID, product.ProductCode); }
public ProductsController( IProductsDataService productsData, ICategoriesDataService categoriesData, ISellersDataService sellersData, IImagesDataService imagesData, IReviewsDataService reviewsData, IHostingEnvironment appEnvironment) { this.productsData = productsData; this.categoriesData = categoriesData; this.sellersData = sellersData; this.imagesData = imagesData; this.reviewsData = reviewsData; this.appEnvironment = appEnvironment; }
public ShoppingCartController(IProductsDataService productsData, UserManager <User> userManager) { this.productsData = productsData; this.userManager = userManager; }
/// <summary> /// Constructor with Dependency Injection using Ninject /// </summary> /// <param name="dataService"></param> public ProductsApiController() { productsDataService = new ProductsDataService(); }
/// <summary> /// Initialize user Business Rules /// </summary> /// <param name="user"></param> /// <param name="dataService"></param> public void InitializeProductsBusinessRules(Product product, IProductsDataService dataService) { productsDataService = dataService; InitializeValidationRules(product); }
/// <summary> /// Constructor /// </summary> public ProductsBusinessService(IProductsDataService dataService) { _productsDataService = dataService; }
public ProductsController(IProductsDataService service) { _service = service; }
public CategoriesController(IProductsDataService productsData, ICategoriesDataService categoriesData) { this.productsData = productsData; this.categoriesData = categoriesData; }
public ProductsManagerProvider(IUnitOfWork uow, IProductsDataService dataService) { _dataService = dataService; _uow = uow; }