Suggestion: BlockExecutor method on Database class.
Andy_PS
Posts: 16
Not a particually ground breaking change but it'd just be a bit cleaner being able to do
"liveDatabase.BlockExecutor(executionBlock);"
rather than
"blockExecutor.ExecuteBlock(blockExecutor, liveDatabase.ConnectionProperties.ServerName, liveDatabase.ConnectionProperties.DatabaseName, liveDatabase.ConnectionProperties.IntegratedSecurity, liveDatabase.ConnectionProperties.UserName, liveDatabase.ConnectionProperties.Password);"
"liveDatabase.BlockExecutor(executionBlock);"
rather than
"blockExecutor.ExecuteBlock(blockExecutor, liveDatabase.ConnectionProperties.ServerName, liveDatabase.ConnectionProperties.DatabaseName, liveDatabase.ConnectionProperties.IntegratedSecurity, liveDatabase.ConnectionProperties.UserName, liveDatabase.ConnectionProperties.Password);"
Comments
The documentation says to dispose the Database and ExecutionBlock objects after use. It'd be nice if they implimented IDisposable so they can be put in using(){} blocks.
I don't know that I like what you're thinking about the ExecuteBlock change though.
I may not be done with the database object after invoking BlockExecuter. I will be done with the actual method and dispose of it when done, but then move on to some other audit checks that are in place that we perform against a database.
If the change you're suggesting were to go through, then that means I'd have to hold that in my memory...we have some very large schema's that are about 135MB when loaded into memory and the block executer...would hold that unless I invoked some kind of "clear me" method.
So...sorry...just an objectional user post from a nobody...take it for what it's worth I suppose...
it would be more like:
Then the Executer could just check for username, password, integrated security, etc.
Okay...I'm done... :shock: