Пример #1
0
        public void RegisterMeal(MealInputDTO meal)
        {
            IList <Garnish> garnishies = new List <Garnish>();

            if (meal.GarnishiesId != null)
            {
                foreach (var g in meal.GarnishiesId)
                {
                    garnishies.Add(userService.GetGarnishById(g));
                }
            }

            sellerService.RegisterMeal(new Meal
            {
                Name        = meal.Name,
                Description = meal.Description,
                Price       = meal.Price,
                MenuId      = meal.MenuId,
                Days        = meal.Days,
                Garnishies  = garnishies
            });
        }
Пример #2
0
 public void CreateMeal(MealInputDTO meal)
 {
     this.sellerAppService.RegisterMeal(meal);
 }