Ejemplo n.º 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);
        }
Ejemplo n.º 2
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;
 }
Ejemplo n.º 3
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;
        }