Esempio n. 1
0
        public async Task <OrderResponseModel> CreateAsync(Guid employeeId, OrderCreateModel model)
        {
            var newOrder = _mapper.Map <Order>(model);

            newOrder.Employee = await _employeeService.FindAsync(employeeId);

            var createdOrder = await _orderService.CreateAsync(newOrder);

            return(_mapper.Map <OrderResponseModel>(createdOrder));
        }