/// <summary> /// 获取父级 /// </summary> /// <param name="parentid"></param> /// <returns></returns> public bool GetParent(string parentid) { var parent = Repository.Get(parentid); if (parent != null) { return(true); } Error.Execute("父级不存在!"); return(false); }
/// <summary> /// 提交 /// </summary> /// <returns></returns> public int SaveChanges() { try { return(Db.SaveChanges()); } catch (Exception ex) { _error.Execute(ex); _logger.LogError(new EventId(ex.HResult), ex, "Repository Exception"); return(0); } }