Exemple #1
0
 public ActionResult <IEnumerable <Keep> > Get()
 {
     try
     {
         return(Ok(_ks.GetAll()));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Exemple #2
0
 public ActionResult <Keep> Get()
 {
     try
     {
         return(Ok(_serv.GetAll()));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Exemple #3
0
 public ActionResult <IEnumerable <Keep> > GetAll()
 {
     try
     {
         return(Ok(_kserv.GetAll()));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
Exemple #4
0
 // REVIEW maybe need async task action
 public ActionResult <IEnumerable <Keep> > GetAll()
 {
     try
     {
         return(Ok(_service.GetAll()));
     }
     catch (Exception error)
     {
         return(BadRequest(error.Message));
     }
 }
Exemple #5
0
        public async Task <ActionResult <IEnumerable <Keep> > > GetAll()
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                return(Ok(_service.GetAll(userInfo?.Id)));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }