/// <summary> /// 获取单条数据 /// </summary> /// <returns></returns> public V_ctms_pm_dotask Get(Expression <Func <ctms_pm_dotask, bool> > predicate = null) { using (ctms_pm_dotaskDAL dal = new ctms_pm_dotaskDAL()){ ctms_pm_dotask entity = dal.Get(predicate); return(EntityToModel(entity)); } }
/// <summary> /// 获取分页数据 /// </summary> /// <param name="page"></param> /// <returns></returns> public IEnumerable <V_ctms_pm_dotask> GetList(PageInfo page) { using (ctms_pm_dotaskDAL dal = new ctms_pm_dotaskDAL()){ var list = dal.Get(); return(list.Paging(ref page).Select(EntityToModel).ToList()); } }
/// <summary> /// 获取列表 /// </summary> /// <returns></returns> public IEnumerable <V_ctms_pm_dotask> Get() { using (ctms_pm_dotaskDAL dal = new ctms_pm_dotaskDAL()){ List <ctms_pm_dotask> entitys = dal.Get().ToList(); List <V_ctms_pm_dotask> list = new List <V_ctms_pm_dotask>(); foreach (ctms_pm_dotask item in entitys) { list.Add(EntityToModel(item)); } return(list); } }