public async Task <IActionResult> Edit(int id, [Bind("Id,Name,ImgUrl,IsDeleted,DeletedOn,CreatedOn,ModifiedOn")] Industry industry) { if (id != industry.Id) { return(NotFound()); } if (ModelState.IsValid) { await _industryServices.UpdateIndustry(industry.Id, industry.Name, industry.ImgUrl); return(RedirectToAction(nameof(Index))); } return(View(industry)); }
public async Task <IActionResult> Update(int id, [FromBody] string name, string imgUrl) { var industry = await _industriesServices.UpdateIndustry(id, name, imgUrl); return(Ok(industry)); }