Beispiel #1
0
 public List<Posts> GetAllPosts(Blogs blog, int count)
 {
     try
     {
         return db.Posts.Where(p => p.BlogsID == blog.BlogsID).OrderByDescending(p => p.Created).Take(count).ToList();
     }
     catch (Exception e)
     {
         throw new Exception(e.InnerException.Message);
     }
 }
Beispiel #2
0
 public List<Posts> GetAllPosts(Blogs blog)
 {
     try
     {
         return db.Posts.Where(p => p.BlogsID == blog.BlogsID).ToList();
     }
     catch (Exception e)
     {
         throw new Exception(e.InnerException.Message);
     }
 }