public async Task <IActionResult> Delete(int id) { if (!ModelState.IsValid) { return(RedirectToErrorPage()); } var isActived = await _shortcutService.DeleteAsync(id); if (!isActived) { return(RedirectToErrorPage()); } return(RedirectToAction(nameof(Index))); }
public async Task <IHttpActionResult> delete([FromBody] ShortcutsVM entity) { return(Ok(await shortCutService.DeleteAsync(entity))); }