Ejemplo n.º 1
0
 public async Task <HttpResponseMessage> GetYears()
 {
     try
     {
         string username = Thread.CurrentPrincipal.Identity.Name;
         return(Request.CreateResponse <IEnumerable <KeyValuePear> >(HttpStatusCode.OK, await UOW.LoadAllYearsForDropDowns()));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
     }
 }