Created
March 28, 2017 17:21
-
-
Save JohannesSundqvist/a4744d24da0e55bd3110ffaef39dda39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IQueryable<Post> GetPost() | |
{ | |
var query = (from p in Post | |
select new Post | |
{ | |
Id = p.Id, | |
Header = p.Header, | |
Text = p.Text, | |
DateCreated = p.DateCreated, | |
Thumbnail = p.Thumbnail, | |
Category = p.Category, | |
}).Distinct(); | |
return query; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment