CoNatural Components v1.8

Rating: No reviews yet
Downloads: 52
Change Set: 50358
Released: Nov 10, 2010
Updated: Nov 10, 2010 by conatural
Dev status: Beta Help Icon

Recommended Download

Application CoNatural Components v1.8
application, 191K, uploaded Nov 10, 2010 - 52 downloads

Release Notes

  • New "Script" commands to execute dynamic sql statements with input parameters.
  • New DynamicReader class (added to VS2010 project) to materialize records into .NET 4.0 dynamic objects (combined with new Script command, users can write very flexible solutions).
  • New ScriptBatch extension method to get script without executing it.
  • Added two more ScriptBatch IConnection extensions to complete all batch execution scenarios.
  • Started work on new ADOMD provider (Basic Sql server analysis services (SSAS) support).
  • Explicit support for nullable string parameters in ParameterAttribute (and internally) since we cannot use string? in property types (strings are nullable by default). Before this change, we had to provide a default value when executing in batch mode.

VS AddIn

  • New option to select a T4 templates folder before generating commands/model (ProjectRoot/T4 is the default templates folder)
  • Added bool IsNullable[] array to CrudHost. Needed to create a model template with WCF attributes.
  • Changed DB object search filters to ignore case and blanks (when searching for tables and stored procedures).

Refactoring:

  • Changed IDbProvider to implement IDbConnection, IDbCommand factory methods instead of DbProviderFactory. Changed all providers to new interface.
  • All command execution methods now create an execution context, and raise before and after execute events. Renamed Connection.Error event to Connection.AfterExecute. Now the event is always raised after the command is executed and closed. In case of DAL errors, the new Context.Error property will hold the exception (Users can hide DAL errors by setting this property to a more user friendly error in the event handler).
  • Created ExecutionContextBase.cs to encapsulate common functionality.
  • Created CommandExecutionContext, ReaderExecutionContext, and BatchExecutionContext with specialized behaviors.
  • Added State property to execution context interface (to maintain user state data in context during command execution).
  • Simplified Reader interface using the ReaderExecutionContext as the only argument passed to the Materialize/Reader interfaces/callbacks. This change is not compatible with previous versions. Custom materializer implementations will require modifications.
  • Refactored ConnectionBase code. More streamlined and with simpler error handling. BeforeExecute/AfterExecute events are raised only by execution context classes when commands are opened/closed.
  • Improved ExecuteReader<T>(...) to yield results directly from data reader instead of returning an internally hydrated list of T. Now we can stop the enumeration at any moment without having to read all the records from the db. This will improve the execution time when we only need a few records (e.g using LINQ filters, Where(predicate), Take(n), paging result sets, etc).



Important: If you are generating commands with the Visual Studio Add-In using VS2010/.NET 4.0 and the T4 templates included in this package, you must remove the language directive referencing .NET 3.5.

Reviews for this release

No reviews yet for this release.