public async Task <IActionResult> Edit(int id, Catalog catalog) { if (id != catalog.Id) { return(NotFound()); } if (ModelState.IsValid) { if (await _catalogService.EditAsync(catalog) > 0) { return(RedirectToAction(nameof(Index))); } } return(View(catalog)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,CatalogName,CatalogDescription,CreatedBy,CreatedDateUtc,LastModifiedBy,LastModifiedDateUtc,IsDeleted")] Catalog catalog) { if (id != catalog.Id) { return(NotFound()); } if (ModelState.IsValid) { if (await _catalogService.EditAsync(catalog) > 0) { return(RedirectToAction(nameof(Index))); } } return(View(catalog)); }