I want to make a dynamic menu in my MVC website i am very new to MVC i do not know more about it . I am following this article for dynamic menu generation
http://www.thecrazyprogrammer.com/2015/02/create-dynamic-menu-in-aspnet-mvc.html
here is the code of, what is ProjectEntities() what is should write there instead of ProjectEntities() .
2 3 4 5 6 7 8 9 10 11 12 13 14 | public static class MyMenu { /// /// Get List of All Menu Items from Database /// /// public static List<Menus> GetMenus() { using(var context = new ProjectEntities()) { return context.Menu.ToList(); } } } |
Vincent Maverick DuranoRank #238 · 10.3K reputationPosted May 2, 2016, 6:58 AM EDT
Munesh SharmaRank #174 · 13.9K reputationPosted May 2, 2016, 9:36 AM EDT
Ravi PatelRank #439 · 5.7K reputationPosted May 2, 2016, 9:12 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts