Пример #1
0
 public ActionResult <Question> GetQuestionById(int Id)
 {
     try
     {
         return(_ps.GetById(Id));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public ActionResult <Question> Get(int id)
 {
     try
     {
         return(Ok(_qs.GetById(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Пример #3
0
 // GET api/values/5
 public Question Get(Guid id)
 {
     return(questionsService.GetById(id));
 }