public Task <PagedGridResult <IEnumerable <ContactConfigurationRM> > > GetContactConfigurations( QueryModels.ContactConfigurationQueryParams queryParams) { List <ContactConfiguration> contactConfigurations = _context.ContactConfigurations.ApplyQuery(queryParams).ToList(); return(Task.FromResult(new PagedGridResult <IEnumerable <ContactConfigurationRM> > { Data = _mapper.Map <IEnumerable <ContactConfigurationRM> >(contactConfigurations), Total = IsPaged(queryParams) ? _context.ContactConfigurations.ApplyQuery(queryParams, false).Count() : contactConfigurations.Count })); }
public Task <IActionResult> GetContactConfigurations([FromQuery] QueryModels.ContactConfigurationQueryParams request) => RequestHandler.HandleQuery(() => _queryRepo.GetContactConfigurations(request), _log);