示例#1
0
        public IActionResult GetCompanyShow()
        {
            List <Company> list  = company_BLL.GetShowTable <Company>();
            var            _list = list.Where(p => p.State == 2).ToList();

            return(Ok(new
            {
                code = 0,
                msg = "",
                data = _list
            }));;
        }
示例#2
0
        public IActionResult GetCompanyShow()
        {
            List <Company> list = company_BLL.GetShowTable <Company>();

            var _model = mapper.Map <Company, ToCompany>(list[0]);
            var _list  = mapper.Map <List <ToCompany> >(list);


            return(Ok(new
            {
                code = 0,
                msg = "",
                model = _model,
                data = _list
            }));;
        }