/// <summary> /// 删除 /// </summary> /// <param name="requestModel"></param> /// <returns></returns> public BusinessBaseViewModel <string> Remove(RemoveSystemDictionaryRequestModel requestModel) { var res = new BusinessBaseViewModel <string>() { Status = ResponseStatus.Fail }; if (requestModel.IsNull()) { res.ErrorMessage = "参数错误"; return(res); } _systemDictionaryRepository.SqlExecute("delete s_SystemDictionary where Id = @Id or ParentId = @Id", new[] { new SqlParameter("Id", requestModel.Id) }); _systemDictionaryRepository.SaveChanges(); res.Status = ResponseStatus.Success; return(res); }
/// <summary> /// 删除 /// </summary> /// <param name="requestModel"></param> /// <returns></returns> public ActionResult Remove(RemoveSystemDictionaryRequestModel requestModel) { var ret = _systemDictionaryService.Remove(requestModel); return(Content(ret.ToJsonString())); }