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
Tridip Bhattacharjee
NA
1.2k
77.7k
How to fetch master detail data using EF and LINQ
Jan 4 2018 6:28 AM
suppose i have a order and order detail entity. i want to fetch specific order data and its related order detail by EF.
can i use this LINQ query
IEnumerable<Order> order= _ctx.order
.Include(x => x.orderdetails)
.Where(x => x.OrderID== _OrderID).ToList();
does the above code works fine? also tell me how to achieve the same with join also?
also tell me if i need to show specific customer data and customer order and order details then how i need to compose my EF query? help me with code. thanks
Reply
Answers (
3
)
Linq with Two Table GroupBy sum column and row in asp.net co
ASP.Net MVC and using Linq to Sql