コード例 #1
0
        // GET: RoleInfo/Delete/5
        public ActionResult Delete()
        {
            int id = int.Parse(Request["id"]);

            roleInfoService.Delete(id);
            return(Content("ok"));
        }
コード例 #2
0
 public ActionResult Delete(string roleInfoId)
 {
     if (string.IsNullOrEmpty(roleInfoId))
     {
         TempData["Message"] = "操作失败";
         return(GetRoleInfoData());
     }
     roleInfoService.Delete(roleInfoId);
     TempData["Message"] = "操作成功";
     return(RedirectToAction("GetRoleInfoData"));
 }
コード例 #3
0
        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
            }));
        }
コード例 #4
0
        public async Task <APIResult> Delete(string guid)
        {
            var result = await service.Delete(guid);

            return(result);
        }