コード例 #1
0
 public ActionResult <Profile> Delete(int id)
 {
     try
     {
         return(Ok(_ps.Delete(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
コード例 #2
0
 public ActionResult <string> Delete(int id)
 {
     try
     {
         string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_ps.Delete(id, userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
コード例 #3
0
 public ActionResult <Profile> Delete()
 {
     try
     {
         var userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_ps.Delete(userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }