TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mark Tabor
589
2k
460.2k
what is the context class in mvc
May 2 2016 10:53 AM
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
{
/// <summary>
/// Get List of All Menu Items from Database
/// </summary>
/// <returns>Returns List<Menus> object</returns>
public
static
List
<
Menus
>
GetMenus
(
)
{
using
(
var
context
=
new
ProjectEntities
(
)
)
{
return
context
.
Menu
.
ToList
(
)
;
}
}
}
Reply
Answers (
3
)
Angular Js in Mvc
Dynamic Parent Child Menu in MVC 4