/// <summary>
        /// 获取全部数据
        /// </summary>
        /// <returns></returns>
        public List <T_EC_KWCategory> GetList()
        {
            List <T_EC_KWCategory> categorys = new List <T_EC_KWCategory>();

            try
            {
                categorys = dao.GetAll <T_EC_KWCategory>().ToList();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(categorys);
        }
示例#2
0
        public ApiResponse GetAll()
        {
            ApiResponse resp = new ApiResponse();

            try
            {
                DAOBase <TipoUsuario> daoA = new DAOBase <TipoUsuario>();
                resp.data    = daoA.GetAll();
                resp.Success = true;
                return(resp);
            }
            catch (Exception e)
            {
                resp.Success   = false;
                resp.ErrorList = new List <string>();
                resp.ErrorList.Add(e.Message);
                return(resp);
            }
        }