예제 #1
0
 public IEnumerable<dynamic> GetUserPosts(int userid)
 {
     dynamic table = new Post();
     object[] queryargs = { userid };
     var posts = table.All(where: "owneruserid = @0", args: queryargs);
     return posts;
 }
예제 #2
0
 public IEnumerable<dynamic> GetUserQuestions(int userid)
 {
     dynamic table = new Post();
     object[] queryargs = { userid };
     var questions = table.All(where: "owneruserid = @0 and posttypeid = 1", args: queryargs);
     return questions;
 }
예제 #3
0
 public IEnumerable<dynamic> GetUserAnswers(int userid)
 {
     dynamic table = new Post();
     object[] queryargs = { userid };
     var answers = table.All(where: "owneruserid = @0 and posttypeid = 2", args: queryargs);
     return answers;
 }