// GET: Ressource/Details/5 public ActionResult Details(int id) { Ressource cm = new Ressource(); RessourceModel c = new RessourceModel(); cm = cs.Get(t => t.id == id); c.nom = cm.nom; c.quantite = cm.quantite; c.type = cm.type; c.etat = cm.etat; ViewBag.id = cm.id; return(View(c)); }