|
|
On SectionName, you have no duplicate values.
"from st in db.SectionTable select st" you will get the Grid Data of SectionTable
"from sn in db.SectionName select sn" you will get the Grid Data of SectionName.
How do you marry these two tables to get a Distinctive Values?
(from st in db.SectionTable
from sn in db.SectionName
where st.SectionID == sn.TableID
select new
{
SectionID = sn.TableID
SectionName = sn.SectionName
}).Distinct();
If you wrap ().Distinct() around your query, you get Distict value of the both!
Hope that Helps...
No comments:
Post a Comment