Пример #1
0
        public async Task QueryAsynchronously(IQuerySession session)
        {
            #region sample_query_with_sql_and_parameters

            var millers = await session
                          .QueryAsync <User>("where data ->> 'LastName' = ?", "Miller");

            #endregion
        }
Пример #2
0
 public async Task <IReadOnlyList <T> > QueryAsync <T>(string sql, CancellationToken token = new CancellationToken(), params object[] parameters)
 {
     return((await _querySession.QueryAsync <T>(sql, token, parameters).ConfigureAwait(false))
            .OnlyItemsTheUserCanSee(_securityQueryProvider, _martenContext)
            .ToList());
 }