Ejemplo n.º 1
0
        public CompaniesListModel List()
        {
            var model = new CompaniesListModel {
                TotalCount = _companyReader.GetCount(),
                Items      = _companyReader.GetList <CompanyInfo>()
            };

            return(model);
        }
Ejemplo n.º 2
0
        public CompaniesListModel List(CompanyFilter filter, ListRequest <CompanyOrder> list)
        {
            list = list ?? new ListRequest <CompanyOrder>();

            var model = new CompaniesListModel
            {
                TotalCount = _companyReader.GetCount(filter),
                Items      = _companyReader.GetList <CompanyInfo>(filter, list.SkipCount, list.TakeCount, list.SortOrder, list.SortDesc)
            };

            return(model);
        }