// GET: RoleInfo/Delete/5 public ActionResult Delete() { int id = int.Parse(Request["id"]); roleInfoService.Delete(id); return(Content("ok")); }
public ActionResult Delete(string roleInfoId) { if (string.IsNullOrEmpty(roleInfoId)) { TempData["Message"] = "操作失败"; return(GetRoleInfoData()); } roleInfoService.Delete(roleInfoId); TempData["Message"] = "操作成功"; return(RedirectToAction("GetRoleInfoData")); }
public async Task <IActionResult> DeleteRoleInfo(string roleId) { // var res = _EFCoreService.DeleteRoleInfo(roleId); var roleInfo = await _roleInfoService.QueryById(roleId); var res = await _roleInfoService.Delete(roleInfo); return(new JsonResult(new Result { Data = res, Msg = $"删除角色{(res ? "成功" : "失败")}", Status = res ? 200 : 204 })); }
public async Task <APIResult> Delete(string guid) { var result = await service.Delete(guid); return(result); }