Пример #1
0
 public ListModel <Company> List([FromBody] ListQuery listQuery)
 {
     return(new ListModel <Company>
     {
         List = _repository.List(listQuery),
         Count = _repository.Count(listQuery)
     });
 }
Пример #2
0
        public List <CompanyModel> GetOrgnaisations(int currentPage, Boolean companyStatus, Int16 pageSize, int AdminCompanyId, ref long totalRecords)
        {
            List <CompanyModel> listCompanyModel = new List <CompanyModel>();
            List <Company>      listCompany      = new List <Company>();

            totalRecords = companyRepository.Count(x => x.RecordDeleted == false && (x.IsActive == companyStatus));
            listCompany  = companyRepository.GetPagedRecords(x => x.IsActive == companyStatus && x.CompanyId != AdminCompanyId && x.RecordDeleted == false, y => y.CompanyName, currentPage, pageSize).ToList();
            AutoMapper.Mapper.Map(listCompany, listCompanyModel);
            return(listCompanyModel);
        }