예제 #1
0
 public IActionResult Get()
 {
     if (repo.GetAll().Any())
     {
         return(Ok(repo.GetAll()));
     }
     else
     {
         return(NotFound());
     }
 }
예제 #2
0
 public ListResultOutput <CountryDto> GetCountries()
 {
     return(new ListResultOutput <CountryDto>(Mapper.Map <List <CountryDto> >(_countryRepository.GetAll())));
 }
예제 #3
0
 public async Task <IEnumerable <County> > GetCounties()
 {
     return(await _countyRepository.GetAll());
 }
예제 #4
0
 public IEnumerable <County> GetAll()
 {
     return(_countyRepository.GetAll());
 }
예제 #5
0
 public List <CountyViewModel> GetAll(bool inactive = false)
 {
     return(_countyRepository.GetAll(inactive).ToList()
            .Select(county => new CountyViewModel(county)) as List <CountyViewModel>);
 }
예제 #6
0
 public IEnumerable <County> GetCounties()
 {
     return(_countyRepository.GetAll().ToList());
 }
예제 #7
0
 public Dictionary <Guid, string> Counties()
 {
     return(_countyRepository.GetAll().OrderBy(n => n.Name)
            .Select(r => new { r.Id, r.Name }).ToList().ToDictionary(d => d.Id, d => d.Name));
 }