public IEnumerable <object> Areas([FromUri] int?id) { City city = _regionDaoFactory.CreateCityDao().Get(id.Value); return(from area in _regionDaoFactory.CreateAreaDao().FindByCity(city) select new { id = area.Id.ToString(), text = area.Name }); }
public IEnumerable <object> Cities([FromUri] int?id) { Province province = _regionDaoFactory.CreateProvinceDao().Get(id.Value); var list = _regionDaoFactory.CreateCityDao().FindByProvince(province); return(from area in list select new { id = area.Id.ToString(), text = area.Name }); }