Looking for some expert advice from you guys, I am going to be attempting to port an L2U solution over to Razor and change the queries... I have a query that I'd like to get your advice on how you would attempt to write it.
var u = MyUmbracoDataContext.Instance;
// Get the lastest 30 posts from this user
var posts = (from p in u.ForumPosts
where p.ForumPostOwnedBy == CurrentMember.MemberId
select p.ParentNodeId).Distinct().Take(30);
// Now get topics where the user has posted
var maintopics = from t in u.ForumTopics
where posts.Contains(t.Id)
orderby t.ForumTopicLastPost descending
select t;
// Now bind
rptTopicList.DataSource = maintopics;
rptTopicList.DataBind();
Convert L2U Queries In Razor?
Looking for some expert advice from you guys, I am going to be attempting to port an L2U solution over to Razor and change the queries... I have a query that I'd like to get your advice on how you would attempt to write it.
is working on a reply...