private ICategoryDiscount CreateCategoryDiscount() { ICategoryDiscount categoryDiscount = null; if (this.Product.Category == ProductCategory.Accessories) { categoryDiscount = new AccessoriesDiscount(); } if (this.Product.Category == ProductCategory.Bikes) { categoryDiscount = new BikesDiscount(); } if (this.Product.Category == ProductCategory.Cloathing) { categoryDiscount = new CloathingDiscount(); } return categoryDiscount; }
private ICategoryDiscount CreateCategoryDiscount() { ICategoryDiscount categoryDiscount = null; if (this.Product.Category == ProductCategory.Accessories) { categoryDiscount = new AccessoriesDiscount(); } if (this.Product.Category == ProductCategory.Bikes) { categoryDiscount = new BikesDiscount(); } if (this.Product.Category == ProductCategory.Cloathing) { categoryDiscount = new CloathingDiscount(); } return(categoryDiscount); }