Example #1
0
 public ActionResult <Bid> Delete(int id)
 {
     try
     {
         return(Ok(_service.Delete(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #2
0
 public ActionResult <bool> Delete(int id)
 {
     try
     {
         return(Ok(_service.Delete(id)));
     }
     catch (System.Exception error)
     {
         return(BadRequest(error.Message));
     }
 }
 public ActionResult <string> Delete(int id)
 {
     try
     {
         return(Ok(_bs.Delete(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #4
0
 public ActionResult <string> Delete(int id)
 {
     try
     {
         _service.Delete(id);
         return(Ok("success"));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Example #5
0
 public ActionResult <string> Delete(int id)
 {
     try
     {
         _bservice.Delete(id);
         return(Ok("DELETED"));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
Example #6
0
        public async Task <ActionResult <string> > Delete(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                _service.Delete(id, userInfo);
                return(Ok("Success!"));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }