Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Reply
how to return multiple entity framework models to the view
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
nit
11 years ago
1.5k
1
Reply
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
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
ontology
problem in gridview..