This question is locked. New answers and comments are not allowed.
i all.
{
eld = new ELearnDataContext();
var query = from n in eld.Forums
join m in eld.ForumTopics
on n.ForumID equals m.ForumID
select new { n.IconFile, n.Title, n.Description, n.DateCreated
};
return query;
}
i have three tables named forum , topics & posts i want some columns from forum table and according to the forumid i want total topics available & post available
here is the query i am using but don't know exactly how it will work.
you may have seen on many forum websites they show forum name total topics in it and total posts in it. i want the exact same.
public IQueryable GetAllForums_TopicsCount_PostCount(){
eld = new ELearnDataContext();
var query = from n in eld.Forums
join m in eld.ForumTopics
on n.ForumID equals m.ForumID
select new { n.IconFile, n.Title, n.Description, n.DateCreated
};
return query;
}