示例#1
0
        public IActionResult SaveDelivery([FromBody] ManufacturerViewModel model)
        {
            try
            {
                var manufacturer             = _iMapper.Map <ManufacturerViewModel, Manufacturer>(model);
                var savedManufacturerDetails = _materialsRepository.SaveDelivery(manufacturer, model.MaterialItems);

                return(Ok(savedManufacturerDetails));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.ToString());
                return(BadRequest());
            }
        }