public List <Region> GetAllRegions() { List <Region> regions = new List <Region>(); RegionTableAdapter adapter = new RegionTableAdapter(); MultiLingualData.RegionDataTable table = adapter.GetAllRegions(); foreach (MultiLingualData.RegionRow row in table) { regions.Add(MultiLingualHelper.ToRegionDTO(row)); } return(regions); }
public Region GetRegion(string regionCode) { if (string.IsNullOrEmpty(regionCode)) { return(new Region()); } RegionTableAdapter adapter = new RegionTableAdapter(); MultiLingualData.RegionDataTable table = adapter.GetRegion(regionCode); if (table.Count == 0) { return(new Region()); } return(MultiLingualHelper.ToRegionDTO(table[0])); }