Exemplo n.º 1
0
 public static TEntity SingleOrDefault <TKey, TEntity>(this IQueryStore <TKey, TEntity> queryStore, IStorageDbConnection conn, IEnumerable <Expression <Func <TEntity, object> > > selectFields, Expression <Func <TEntity, object> > id, TKey value)
     where TKey : IEquatable <TKey>
     where TEntity : class, IEntity <TKey>
 {
     if (queryStore == null)
     {
         throw new ArgumentNullException(nameof(queryStore));
     }
     return(queryStore.SingleOrDefault(conn, selectFields, id, value, null));
 }
Exemplo n.º 2
0
 public static TEntity SingleOrDefault <TKey, TEntity>(this IQueryStore <TKey, TEntity> queryStore, IStorageDbConnection conn, TKey value, IDbTransaction tr)
     where TKey : IEquatable <TKey>
     where TEntity : class, IEntity <TKey>
 {
     if (queryStore == null)
     {
         throw new ArgumentNullException(nameof(queryStore));
     }
     return(queryStore.SingleOrDefault(conn, null, _ => _.Id, value, tr));
 }