public Dish(string name, List <string> ingredientNames, float price = 0f) { dishDAL = DishFactory.CreateIDishDal(); this.Name = name; this.Price = price; this.Ingredients = new IngredientContainer().FindByNames(ingredientNames); }
static DependencyResolver() { AccountDal = new AccountDAL(); AccountBLL = new AccountBLL(AccountDal); ProductDAL = new ProductDAL(); ProductBLL = new ProductBLL(ProductDAL); DishDAL = new DishDAL(); DishBLL = new DishBLL(DishDAL); }
public Dish(string name, float price = 0, IDishDAL dal = null) { if (dal != null) { this.dishDAL = dal; } else { this.dishDAL = DishFactory.CreateIDishDal(); } this.Name = name; this.Price = price; }
public Dish(string name, List <Ingredient> ingredients, float price = 0, IDishDAL dal = null) { if (dal != null) { this.dishDAL = dal; } else { this.dishDAL = DishFactory.CreateIDishDal(); } this.Name = name; this.Price = price; this.Ingredients = ingredients; }
public DishBLL(IDishDAL dishDAL) { this.dishDAL = dishDAL; }