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
585
2k
460.3k
how to get related data from second table based on the value of first
Nov 4 2020 4:48 AM
I have two tables student_courses and student table
student_ID
Email
NAme
Password
1
[email protected]
TABOR
123123
2
[email protected]
MARK
123123
Second I have student Courses table
id
student_ID
course_Id
year
program
1
1
1
1
2
2
1
2
1
2
now i want to get the email of all students who is having year 1 and program 2 below is my code by which i am getting data from student courses table , but it did not have email , email field is in student table how to achieve that .
return std.Student_courses.Where(x => x.Program_Id == program && x.Year_Id == year ).ToList();
Reply
Answers (
4
)
AutoMapper in c# using MVC
Share post on linkdin ,Instagram , facebook