/// <summary>
        /// 从存储媒介中删除对象
        /// </summary>
        /// <param name="roleAuthor"></param>
        /// <returns></returns>
        public ExecResult DeleteRoleAuthor(RoleAuthorEntity roleAuthor)
        {
            IRoleAuthorService service = ServiceContainer.Instance.Container.Resolve <IRoleAuthorService>();
            ExecResult         result  = new ExecResult();

            try
            {
                IRoleAuthorService roleAuthorService = ServiceContainer.Instance.Container.Resolve <IRoleAuthorService>();
                bool flag = roleAuthorService.DeleteRoleAuthor(roleAuthor);
                if (flag)
                {
                    result.result = EnumJsonResult.success.ToString();
                    result.msg    = "成功";
                }
                else
                {
                    result.result = EnumJsonResult.failure.ToString();
                    result.msg    = "操作失败";
                }
            }
            catch (Exception ex)
            {
                result.result = EnumJsonResult.error.ToString();
                result.msg    = "删除角色作者信息时出现异常:" + ex.Message;
            }
            return(result);
        }
 public IActionResult Delete(int id)
 {
     try
     {
         if (ModelState.IsValid)
         {
             var result = _roleAuthorService.DeleteRoleAuthor(id);
             TempData["SuccessMsg"] = "Data deleted successfully";
         }
     }
     catch (Exception ex)
     {
         TempData["ErrorMsg"] = ex.Message;
     }
     return(RedirectToAction("Index"));
 }