Here are the examples of the csharp api class System.Data.Common.DbCommand.PreviewCommandText(bool) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
14 Examples
0
1. Example
View licensepublic static string DeleteBatchSQL<TEntity>( this Table<TEntity> table, IQueryable<TEntity> entities ) where TEntity : class { DbCommand delete = table.GetDeleteBatchCommand<TEntity>( entities ); return delete.PreviewCommandText( true ); }
0
2. Example
View licensepublic static string UpdateBatchSQL<TEntity>( this Table<TEntity> table, IQueryable<TEntity> entities, Expression<Func<TEntity, TEntity>> evaluator ) where TEntity : class { DbCommand update = table.GetUpdateBatchCommand<TEntity>( entities, evaluator ); return update.PreviewCommandText( true ); }
0
3. Example
View licensepublic static string PreviewSQL( this DataContext context, IQueryable query ) { var cmd = context.GetCommand( query ); return cmd.PreviewCommandText( true ); }
0
4. Example
View licensepublic static string PreviewCommandText( this DataContext context, IQueryable query ) { var cmd = context.GetCommand( query ); return cmd.PreviewCommandText( false); }
0
5. Example
View licensepublic static string DeleteBatchSQL<TEntity>( this Table<TEntity> table, IQueryable<TEntity> entities ) where TEntity : class { DbCommand delete = table.GetDeleteBatchCommand<TEntity>( entities ); return delete.PreviewCommandText( true ); }
0
6. Example
View licensepublic static string UpdateBatchSQL<TEntity>( this Table<TEntity> table, IQueryable<TEntity> entities, Expression<Func<TEntity, TEntity>> evaluator ) where TEntity : class { DbCommand update = table.GetUpdateBatchCommand<TEntity>( entities, evaluator ); return update.PreviewCommandText( true ); }
0
7. Example
View licensepublic static string PreviewSQL( this DataContext context, IQueryable query ) { var cmd = context.GetCommand( query ); return cmd.PreviewCommandText( true ); }
0
8. Example
View licensepublic static string PreviewCommandText( this DataContext context, IQueryable query ) { var cmd = context.GetCommand( query ); return cmd.PreviewCommandText( false); }
0
9. Example
View licensepublic static string DeleteByPKPreview<TEntity>( this Table<TEntity> table, object primaryKey ) where TEntity : class { DbCommand delete = table.GetDeleteByPKCommand<TEntity>( primaryKey ); return delete.PreviewCommandText( false ) + table.Context.GetLog(); }
0
10. Example
View licensepublic static string DeleteByPKPreview<TEntity>( this Table<TEntity> table, object primaryKey ) where TEntity : class { DbCommand delete = table.GetDeleteByPKCommand<TEntity>( primaryKey ); return delete.PreviewCommandText( false ) + table.Context.GetLog(); }
0
11. Example
View licensepublic static string DeleteBatchPreview<TEntity>( this Table<TEntity> table, IQueryable<TEntity> entities ) where TEntity : class { DbCommand delete = table.GetDeleteBatchCommand<TEntity>( entities ); return "Total Rows To Be Deleted By Query: " + entities.Count() + "\n\n" + delete.PreviewCommandText( false ) + table.Context.GetLog(); }
0
12. Example
View licensepublic static string UpdateBatchPreview<TEntity>( this Table<TEntity> table, IQueryable<TEntity> entities, Expression<Func<TEntity, TEntity>> evaluator ) where TEntity : class { DbCommand update = table.GetUpdateBatchCommand<TEntity>( entities, evaluator ); return "Total Rows To Be Updated By Query: " + entities.Count() + "\n\n" + update.PreviewCommandText( false ) + table.Context.GetLog(); }
0
13. Example
View licensepublic static string DeleteBatchPreview<TEntity>( this Table<TEntity> table, IQueryable<TEntity> entities ) where TEntity : class { DbCommand delete = table.GetDeleteBatchCommand<TEntity>( entities ); return "Total Rows To Be Deleted By Query: " + entities.Count() + "\n\n" + delete.PreviewCommandText( false ) + table.Context.GetLog(); }
0
14. Example
View licensepublic static string UpdateBatchPreview<TEntity>( this Table<TEntity> table, IQueryable<TEntity> entities, Expression<Func<TEntity, TEntity>> evaluator ) where TEntity : class { DbCommand update = table.GetUpdateBatchCommand<TEntity>( entities, evaluator ); return "Total Rows To Be Updated By Query: " + entities.Count() + "\n\n" + update.PreviewCommandText( false ) + table.Context.GetLog(); }