// GET: Brands/Delete/5 public ActionResult Delete(int?id) { if (!id.HasValue) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Brands brands = Brands.FindOne(id.Value); if (brands == null) { return(HttpNotFound()); } return(View(brands)); }