public AjaxResult DeleteAccounts(IEnumerable <string> ids) { foreach (var id in ids) { _profileManagementService.DeleteAccount(Int32.Parse(id)); } return(new AjaxResult(AjaxResultState.OK)); }
public IActionResult DeleteAccount(int id) { try { // TODO: Add delete logic here _profileManagementService.DeleteAccount(id); return(RedirectToAction(nameof(IndexAccount))); } catch { return(RedirectToAction(nameof(DeleteAccount))); } }