Exemplo n.º 1
0
 public ActionResult Delete(int id, Species especie)
 {
     try
     {
         // TODO: Add delete logic here
         db.Delete(id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Exemplo n.º 2
0
 public void delete(DeleteSpecieRequest request)
 {
     try
     {
         var response = new DeleteSpecieResponse();
         var bc       = new SpecieComponent();
         bc.Delete(request.Id);
     }
     catch (Exception ex)
     {
         var httpError = new HttpResponseMessage()
         {
             StatusCode   = (HttpStatusCode)422,
             ReasonPhrase = ex.Message
         };
         throw new HttpResponseException(httpError);
     }
 }
Exemplo n.º 3
0
 public ActionResult DeleteConfirmed(int id)
 {
     db.Delete(id);
     return(RedirectToAction("Index"));
 }
Exemplo n.º 4
0
 public void Delete(int id)
 {
     bs.Delete(id);
 }