public async Task <IActionResult> PutItem(int id, ItemBll item) { if (id != item.Id) { return(BadRequest()); } await _itemService.PutItem(id, item); return(NoContent()); }
public async Task <IActionResult> PutItem(int id, [FromBody] ItemBll item) { if (id != item.Id) { return(BadRequest()); } var blItem = new ItemBll { Id = item.Id, Name = item.Name, Image = item.Image.Substring(item.Image.IndexOf(",") + 1) }; await _itemService.PutItem(id, blItem); return(NoContent()); }