/// <summary> /// 删除一个角色 /// </summary> /// <param name="validationErrors">返回的错误信息</param> /// <param name="id">一个角色的主键</param> /// <returns></returns> public bool Delete(ref ValidationErrors validationErrors, string id) { try { return(repository.Delete(id) == 1); } catch (Exception ex) { validationErrors.Add(ex.Message); ExceptionsHander.WriteExceptions(ex); } return(false); }
public virtual bool Delete(string id) { try { if (m_Rep.Delete(id) == 1) { return(true); } else { return(false); } } catch (Exception ex) { return(false); } }