public static Task <IEnumerable <PublicClassifiedAdListItem> > Query(
     this DbConnection connection,
     QueryModels.GetOwnersClassifiedAd query)
 => connection.QueryAsync <PublicClassifiedAdListItem>(
     "SELECT \"ClassifiedAdId\", \"Price_Amount\" price, \"Title_Value\" title " +
     "FROM \"ClassifiedAds\" WHERE \"OwnerId_Value\"=@OwnerId LIMIT @PageSize OFFSET @Offset",
     new
 {
     OwnerId  = query.OwnerId,
     PageSize = query.PageSize,
     Offset   = Offset(query.Page, query.PageSize)
 });
 public static Task <List <ReadModels.PublicClassifiedAdListItem> > Query(
     this IAsyncDocumentSession session,
     QueryModels.GetOwnersClassifiedAd query)
 =>
 session.Query <Domain.ClassifiedAd.ClassifiedAd>()
 .Where(x => x.OwnerId.Value == query.OwnerId)
 .Select(x =>
         new ReadModels.PublicClassifiedAdListItem
 {
     ClassifiedAdId = x.Id.Value,
     Price          = x.Price.Amount,
     Title          = x.Title.Value,
     CurrencyCode   = x.Price.Currency.CurrencyCode
 })
 .PagedList(query.Page, query.PageSize);
 public Task <IActionResult> Get(QueryModels.GetOwnersClassifiedAd request) =>
 RequestHandler.HandleQuery(() => _session.Query(request), _log);