Exemplo n.º 1
0
 /// <summary>
 /// Create database command builder.
 /// </summary>
 /// <typeparam name="TEntity">Entity type.</typeparam>
 /// <param name="queryBuilder">Query builder.</param>
 /// <param name="storageContext">Database storage context.</param>
 /// <returns>Returns a command builder.</returns>
 public abstract DbCommandBuilder <TEntity> CreateCommandBuilder <TEntity>(
     DbQueryBuilder <TEntity> queryBuilder, IDbStorageContext storageContext)
     where TEntity : IEntity;
 /// <summary>
 /// Create database command builder.
 /// </summary>
 /// <typeparam name="TEntity">Entity type.</typeparam>
 /// <param name="queryBuilder">Query builder.</param>
 /// <param name="storageContext">Database storage context.</param>
 /// <returns>Returns a command builder.</returns>
 public override DbCommandBuilder <TEntity> CreateCommandBuilder <TEntity>(
     DbQueryBuilder <TEntity> queryBuilder, IDbStorageContext storageContext)
 {
     return(new DbCommandBuilder <TEntity>(queryBuilder, storageContext));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initialize a new instance of the class.
 /// </summary>
 /// <param name="queryBuilder">Query builder.</param>
 /// <param name="storageContext">Storage context.</param>
 public DbCommandBuilder(DbQueryBuilder <TEntity> queryBuilder, IDbStorageContext storageContext)
 {
     _storageContext = storageContext;
     _configuration  = _storageContext.GetEntityConfiguration <TEntity>();
     _queryBuilder   = queryBuilder;
 }