// Partial: get town list for Index public PartialViewResult RenderTownList() { List <Town> towns = townRepository.GetAllTowns(); return(PartialView("_TownListPartial", towns)); }
public async Task <List <TownDto> > GetAllTowns() { List <TownDto> towns = await _townRepository.GetAllTowns(); return(towns); }