public async Task <ActionResult <IEnumerable <EndpointRuleListDto> > > GetAll(bool actionDetails = false) { var rules = await _endpointRuleRepository.GetAllAsync(); if (actionDetails) { return(Ok(rules.Select(r => r.ToEndpointRuleDto(_internalHelper)))); } return(Ok(_mapper.Map <List <EndpointRuleListDto> >(rules))); }
public async Task <IEnumerable <EndpointRuleEntity> > GetAll() { var rules = await _endpointRuleRepository.GetAllAsync(); return(rules); }