// GET: Flowers/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Flower flower = flowerRepository.GetFlower(id.Value); if (flower == null) { return(HttpNotFound()); } ViewBag.NumberPl = flowerRepository.GetNumberPlantations(id.Value); ViewBag.NumberWa = flowerRepository.GetNumberWarehouses(id.Value); ViewBag.NumberSu = flowerRepository.GetNumberSupplies(id.Value); return(View(flower)); }