Esempio n. 1
0
 public IHttpActionResult GetWatchListById(int Id)
 {
     if (Id != 0)
     {
         var watchList = WatchlistService.GetWatchListById(Id);
         if (watchList == null)
         {
             return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Watchlist is not found.")));
         }
         return(Json(watchList));
     }
     else
     {
         return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Id is not provided.")));
     }
 }