/// <summary> /// 根据查询条件和Hql查询 /// </summary> /// <param name="condition"></param> /// <returns></returns> public static T[] FindAll(HqlSearchCriterion criterion, EditStatusEnum editStatus, params ICriterion[] crits) { IList <ICriterion> critList = crits.ToList(); critList.Add(Expression.Eq("EditStatus", editStatus.ToString())); return(criterion.FindAll <T>(critList.ToArray())); }
/// <summary> /// 通过编辑状态找数据 /// </summary> /// <param name="editStatus"></param> public T[] FindAll(EditStatusEnum editStatus) { return(FindAll(editStatus.ToString())); }
/// <summary> /// 根据查询条件查询 /// </summary> /// <param name="condition"></param> /// <returns></returns> public static T[] FindAll(HqlSearchCriterion criterion, EditStatusEnum editStatus) { return(criterion.FindAll <T>(Expression.Eq("EditStatus", editStatus.ToString()))); }