Created
March 28, 2017 17:53
-
-
Save JohannesSundqvist/d9823db1965b0b075b92494144945dd1 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> GetCategories() | |
{ | |
var query = (from p in Post | |
select new Post | |
{ | |
Category = p.Category, | |
}).Distinct(); | |
return query; | |
} | |
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, | |
}); | |
return query; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment