public ActionResult Delete(int id, FormCollection collection)
        {
            complaint c = cs.GetById(id);

            cs.Delete(c);
            cs.Commit();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public IHttpActionResult Delete(int id)
 {
     try
     {
         _complaintService.Delete(id);
         return(Ok());
     }
     catch (Exception ec)
     {
         return(BadRequest(ec.Message));
     }
 }