Exemplo n.º 1
0
 public ActionResult Delete(UserShowWithAwardsVM user)
 {
     ViewBag.Breadcrumb = new Breadcrumb("user", "delete", user.Name);
     if (userDm.Delete(user.ID))
     {
         return(RedirectToAction(nameof(Index)));
     }
     else
     {
         return(new HttpStatusCodeResult(400));
     }
 }
Exemplo n.º 2
0
 public IHttpActionResult Delete(int id)
 {
     if (userDm.GetUserByID(id) == null)
     {
         return(NotFound());
     }
     else
     {
         userDm.Delete(id);
         return(Ok());
     }
 }