public ActionResult DeleteConfirmed(Guid id) { var storage = new Storage(); //Storage storage = _uow.Storages.Find(id); _uow.Storages.Remove(storage); _uow.Save(); return RedirectToAction("Index"); }
// GET: /Admin/Storage/Delete/5 public ActionResult Delete(Guid? id) { if (id == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } var storage = new Storage(); //Storage storage = _uow.Storages.Find(id); if (storage == null) { return HttpNotFound(); } return View(storage); }