Пример #1
0
        public async Task <IActionResult> PutAsync(string code, [FromBody] BomForUpdateDto value)
        {
            value.BomCode = code;
            await _bomService.UpdateAsync(value);

            return(Ok());
        }
        public async Task <IActionResult> UpdateAsync(int id, [FromBody] BillOfMaterials bom)
        {
            var result = await _bomService.UpdateAsync(bom);

            if (result.Success)
            {
                return(Ok(JsonConvert.SerializeObject(result.Message)));
            }
            return(BadRequest(JsonConvert.SerializeObject(result.Message)));
        }