public List <Sector> GetAllSectors() { var sectors = new List <Sector>(); var sectorDTOs = _sectorDAL.GetAll(); foreach (var sectorDTO in sectorDTOs) { sectors.Add(new Sector(sectorDTO)); } return(sectors); }
public static List <Sector> GetAll(int limit = -1) { List <SectorDTO> sectorsDto = SectorDAL.GetAll(limit); List <Sector> sectors = new List <Sector>(); foreach (SectorDTO sector in sectorsDto) { sectors.Add(new Sector(sector)); } return(sectors); }