public IActionResult Get(object datas) { try { CityServices cityDb = new CityServices(); var CountryId = JsonConvert.DeserializeObject <Dictionary <string, int> >(datas.ToString()); var citys = cityDb.Where(x => x.CountryId == CountryId["CountryId"]).OrderBy(x => x.Name).Select(x => new { id = x.Id, Name = x.Name }).ToList(); return(Ok(ResponseHandler.ResponseMessageHandler(200, "Success", citys))); } catch (Exception ex) { //LogsServices.Log("City - Get", ex.Message.ToString(), 3); return(Ok(ResponseHandler.ResponseMessageHandler(400, "Error"))); } }