public List <ComboBoxModel> Municipalitiy() { List <ComboBoxModel> result = new List <ComboBoxModel>(); var municipality = Municipalities.GetAll(); result = municipality.Select(s => new ComboBoxModel { id = s.id_municipality, Name = s.Name }).ToList(); return(result); }
private static object GetAll(dynamic _) { try { return(Municipalities.GetAll()); } catch (Exception e) { return(Helper.ErrorResponse(e, HttpStatusCode.InternalServerError)); } }