Пример #1
0
 public Post GetPost(Guid id)
 {
     return(AddedPosts.Where(p => p.ID == id).FirstOrDefault());
 }
Пример #2
0
 public Post GetPost(PostAddress postAddress)
 {
     return(AddedPosts.Where(p => p.Slug == postAddress.Slug).FirstOrDefault());
 }
Пример #3
0
 public Post GetPost(Area area, string slug)
 {
     return(AddedPosts.Where(p => p.Slug == slug).FirstOrDefault());
 }
Пример #4
0
 public IPageOfList <Post> GetPosts(int pageIndex, int pageSize, Area area, DateTime?sinceDate)
 {
     return(new PageOfList <Post>(AddedPosts.Where(p => p.Area.ID == area.ID), pageIndex, pageSize, AddedPosts.Count));
 }
Пример #5
0
 public IPageOfItems <Post> GetPosts(int pageIndex, int pageSize, AreaAddress areaAddress, DateTime?sinceDate)
 {
     return(new PageOfItems <Post>(AddedPosts.Where(p => p.Area.Name == areaAddress.AreaName), pageIndex, pageSize, AddedPosts.Count));
 }