Пример #1
0
 public GetNewsByIdResult Get(int id)
 {
     try
     {
         if (id <= 0)
         {
             throw new ArgumentNullException(nameof(id));
         }
         return(new GetNewsByIdResult()
         {
             Item = NewsManager.GetByID(id)
         });
     }
     catch (Exception ex)
     {
         return(new GetNewsByIdResult(ex));
     }
 }