internal CityModal GetCityByCityName(string cityname) { TblCity tblCity = _db.TblCities.Where(t => t.CityName == cityname).FirstOrDefault(); CityModal cityModal = new CityModal() { CityId = tblCity.Id, CityName = tblCity.CityName, State = tblCity.StateName }; return(cityModal); }
public IHttpActionResult GetBlockInCity(string cityname) { CityModal cityModal = _helpers.ConfigHelper.GetCityByCityName(cityname); if (cityModal != null) { List <BlockCategoryModal> blockCities = _helpers.BlockHelper.GetBlockCategoryListWithCount(cityModal.CityId); return(Ok(blockCities)); } else { return(Ok()); } }