// Partial: get town list for Index
        public PartialViewResult RenderTownList()
        {
            List <Town> towns = townRepository.GetAllTowns();

            return(PartialView("_TownListPartial", towns));
        }
Beispiel #2
0
        public async Task <List <TownDto> > GetAllTowns()
        {
            List <TownDto> towns = await _townRepository.GetAllTowns();

            return(towns);
        }