I have two tables student_courses and student table
| student_ID | NAme | Password | |
| 1 | [email protected] | TABOR | 123123 |
| 2 | [email protected] | MARK | 123123 |
| 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();
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Nov 4, 2020, 5:04 AM
Mark TaborPosted Nov 4, 2020, 5:36 AM
Mark TaborPosted Nov 4, 2020, 5:35 AM
Mark TaborPosted Nov 4, 2020, 5:23 AM