public IEnumerable<dynamic> GetUserPosts(int userid) { dynamic table = new Post(); object[] queryargs = { userid }; var posts = table.All(where: "owneruserid = @0", args: queryargs); return posts; }
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; }
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; }