Пример #1
0
 public ActionResult <IEnumerable <Article> > Get(int id)
 {
     try
     {
         return(Ok(repository.GetArticleById(id)));
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception);
         return(BadRequest("Failed to get article"));
     }
 }