Пример #1
0
        public void CreateDrink(int machineId, DrinkDto drinkDto)
        {
            var machine = _wendingMachineRepository.GetMachineBy();

            machine.Drinks.Add(Mapper.Map <Drink>(drinkDto));
            _wendingMachineRepository.Update(machine);
        }
        public List <DrinkDto> GetAllDrinks(int machineId)
        {
            var machine = _wendingMachineRepository.GetMachineBy();

            return(machine.Drinks.Select(Mapper.Map <DrinkDto>).ToList());
        }