Esempio n. 1
0
 public Task <Post> GetPostById(int id)
 {
     return(AllPost.Where(p => p.Id == id).FirstOrDefaultAsync());
 }
Esempio n. 2
0
 public Task <List <Post> > GetPostsByUserId(int userId)
 {
     return(AllPost.Where(p => p.Id == userId).ToListAsync());
 }