예제 #1
0
        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);
        }
예제 #2
0
 private static object GetAll(dynamic _)
 {
     try
     {
         return(Municipalities.GetAll());
     }
     catch (Exception e)
     {
         return(Helper.ErrorResponse(e, HttpStatusCode.InternalServerError));
     }
 }