Esempio n. 1
0
        private void WriteCalculation(Day day, List <DishParam> dishes, int weight)
        {
            try
            {
                var calc = day.Calculations.FirstOrDefault(x => x.ClientWeight == weight);
                if (calc != null)
                {
                    _repository.DeleteCalculation(calc.Id);
                }

                AddCalculation(day.Id, dishes, weight);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }