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