Click here to Skip to main content
15,899,825 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Please I have a forum app and i have an e-Library, and i want to "get from model repository by id in my controller. How do i get that done. See what i have:

public ActionResult _BookDetails(string id)
{
var mybook = db.Library.Where(a=>a.LibraryId = id.ToUpper());
//if (book != null)
//{
// ViewBag.p = "True";
//}

ViewBag.mybook = mybook;
return PartialView();
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900