public ActionResult Delete(string[] ids) { if (ids == null || !ids.Any()) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } foreach (string id in ids) { operatorService.Delete(id); } return(RedirectToAction("Index") .WithWarning("The selected operator have been deleted".TA())); }
public ActionResult OperatorDelete(OperatorVm operatorModel) { _operatorService.Delete(operatorModel.Id); return(RedirectToAction("GetOperators", "Operator", new { area = "Admin" })); }
public async Task <ActionResult> DeleteOperator(int id) { await _operatorService.Delete(id); return(NoContent()); }