public JsonResult SearchAutoComplete(int cityId, string nameSubstring) { var names = new List <string>(); try { names = _apartmentService.AutoComplete(cityId, nameSubstring).ToList(); } catch (Exception ex) { _log.LogError(ex, ex.Message); } return(Json(names)); }