Reputation: 2295
I have two tables: Student (StuID, Name, Sex, MajorID, ...) and Major (MajorID, MajorName, ...). I would like to get result: StuID, Name, MajorName. How to retrieve this record using ADO.Net Entity Data Model?
Upvotes: 0
Views: 927
Reputation: 1435
I think that you are asking for C# LINQ query, if you are not, please ignore my anwser.
var result = from s in Student
join m in Major on s.MajorID equal m.MajorID
select new {s.StuID, s.Name, m.MajorName}
Upvotes: 1