Пример #1
0
 public HttpResponseMessage <Contest> GetWinner(HttpRequestMessage request)
 {
     try
     {
         return(new HttpResponseMessage <Contest>(contestRepository.GetWinner())
         {
             StatusCode = HttpStatusCode.OK
         });
     }
     catch
     {
         return(new HttpResponseMessage <Contest>(null)
         {
             StatusCode = HttpStatusCode.BadRequest
         });
     }
 }