public IEnumerable <Quote> ListQuotes(ListQuotesRequest filter) { var query = _db.Quotes .Where( x => x.DeletedAt == null && x.GuildId == filter.GuildId && x.ChannelId == filter.ChannelId ); query = query .OrderByDescending(x => x.CreatedAt) .Skip((filter.PageNumber - 1) * filter.PageSize) .Take(filter.PageSize); return(query.ToList()); }
public IHttpActionResult Get([FromUri] ListQuotesRequest request) { var result = _listQuoteRequestProcessor.Process(request); return(Ok(result)); }