コード例 #1
0
 public ActionResult <Kit> Delete(int id)
 {
     try
     {
         return(Ok(_service.Delete(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
コード例 #2
0
ファイル: KitsController.cs プロジェクト: JacobGrow/Lego-API
 public ActionResult <Kit> Delete(int id)
 {
     try
     {
         string UserEmail = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;     // req.userInfo.email
         return(Ok(_service.Delete(id, UserEmail)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }