예제 #1
0
 public HttpResponseMessage <List <CollectionItem> > GetCollectionItemsByEarthwatcher(int earthwatcherId, HttpRequestMessage request)
 {
     try
     {
         return(new HttpResponseMessage <List <CollectionItem> >(collectionsRepository.GetCollectionItemsByEarthwatcher(earthwatcherId))
         {
             StatusCode = HttpStatusCode.OK
         });
     }
     catch (Exception ex)
     {
         return(new HttpResponseMessage <List <CollectionItem> >(null)
         {
             StatusCode = HttpStatusCode.BadRequest, ReasonPhrase = ex.Message
         });
     }
 }