Пример #1
0
        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);
        }
Пример #2
0
 static DependencyResolver()
 {
     AccountDal = new AccountDAL();
     AccountBLL = new AccountBLL(AccountDal);
     ProductDAL = new ProductDAL();
     ProductBLL = new ProductBLL(ProductDAL);
     DishDAL    = new DishDAL();
     DishBLL    = new DishBLL(DishDAL);
 }
Пример #3
0
 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;
 }
Пример #4
0
        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;
 }