public async Task <IActionResult> Delete([Required] string id) { var result = await _services.DeleteAsync(id); if (result.IsValid) { await _systemAuditService.AuditAsync(User.GetEmail(), _accessor.GetIp(), Operations.Delete, Tables.Activities); } return(Ok(result)); }
public async Task <IActionResult> DeleteConfirmed(string id) { if (id == null) { return(NotFound()); } var result = await _services.DeleteAsync(id); return(result.IsValid ? RedirectToAction("Index") : _oops.OutPutError("Activities", "Index", result.ErrorsList)); }
public async Task <IActionResult> DeleteConfirmed([Required] string id) { var result = await _services.DeleteAsync(id); if (result.IsValid) { await _systemAuditService.AuditAsync(User.GetEmail(), _accessor.GetIp(), Operations.Delete, Tables.Activities); return(RedirectToAction("Index")); } TempData["ErrorsList"] = result.ErrorsList; return(View()); }