tatSleceBoodo
New Member
I am working on a service layer implementation in asp mvc with LINQ. For example there are Users , Posts and Votes something like Stackoverflow. Each user have a reputation gained from upvotes and downvotes. This vote table has following attributes: id , postTypeId, voteTypeId, creationDate , VoterIdThis Post table has following attribute : id, userId ....and User table includes : idfor each upvote 2 marks are given , for each downvote 1 mark is reducedI need how to write a query with Linq how to query , to show reputation change: reputation per Date , time and date, whether it's a upvote or downvote and related post these are the attributes I am going to use,\[code\]var jointable = from vote in _dataContext.Votes join post in _dataContext.Posts on vote.PostId equals post.Id where vote.VoterId== id select new { vote.Id, vote.CreationDate, vote.PostId, vote.VoteTypeId, post.PostTypeId, post.Title, post.IsAnonymous }; \[/code\]After this can somebody help me to query those attributes to return them as an object??