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
nit
NA
1
1.7k
how to return multiple entity framework models to the view
Apr 4 2013 5:56 AM
This is the action in the controller where i'm trying to pass a single entity model to the view.
public ActionResult Appointment()
{
return view(dt.sometable.ToList());
}
This is the view page where i'm using the model sent from the action. I'm using the razor tag to display the values from the model.
@model IEnumerable<MyProject.Models.sometable>
@foreach (var item in Model)
{
@item.lname
}
Now. My query is. I want to send 2 entity models from my action to the view. I want to use the data from both the entity models in my view page.
Please provide a solution.
Thank you
Reply
Answers (
1
)
ontology
problem in gridview..