public async Task <List <Comment> > GetCommentsByShoutIdAsync(int shoutId, int lastId = 0, short limit = 10) { await base._dBContext.OpenDBConnectionAsync(); using (base._dBContext.DbConnection) { return((List <Comment>) await base._dBContext.DbConnection.QueryAsync <Comment>( $@"{DapperHelperQueries.GetCommentQueryWithoutWhere()} WHERE Comment.ShoutId = { shoutId } AND {DapperHelperQueries.PaginatedQueryDESC( "Comment", lastId, limit )} " )); } }
public async Task <List <Shout> > GetByUserIdAsync(int userId, int lastId = 0, short limit = 10) { await base._dBContext.OpenDBConnectionAsync(); using (base._dBContext.DbConnection) { return((List <Shout>) await base._dBContext.DbConnection.QueryAsync <Shout>( $@"{DapperHelperQueries.GetShoutQueryWithoutWhere()} WHERE Shout.UserId = { userId } AND {DapperHelperQueries.PaginatedQueryDESC( "Shout", lastId, limit )} " )); } }
public async Task <List <Shout> > GetFollowingShoutsByUserIdAsync(int userId, int lastId = 0, short limit = 10) { throw new NotImplementedException(); await base._dBContext.OpenDBConnectionAsync(); using (base._dBContext.DbConnection) { return((List <Shout>) await base._dBContext.DbConnection.QueryAsync <Shout>( $@"{DapperHelperQueries.GetShoutQueryWithoutWhere()} WHERE {DapperHelperQueries.PaginatedQueryDESC( "Shout", lastId, limit )} " )); } }