This repository has been archived by the owner on Dec 23, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Comprehensive Feature List
Ovan Crone edited this page Mar 9, 2015
·
6 revisions
-
Commands Types
- Scalar
- NonQuery
- Query
- Multiple ResultSet Queries (up to 7)
- SQL Text and Stored Procedure
-
Robust result mappings
- POCO (Plain Old CLR Object) via Expression Trees
- Dynamic
- Built-in types for single column results (int, string, bool, DateTime, Guid, decimal, Int64, etc.)
- Custom Mappings (For objects that are not POCOs that may have additional restrictions)
- KeyValuePair<,> Custom mapping provided "out of the box"
- Declarative attributes can control aliases and ignore functionality.
-
Versatile parameter definition
- Parameters are provided through an anonymous OR optionally typed "Filter" parameter at execution call.
- An additional object parameter on Execute allows for separating business parameters from control parameters. (security, sorting, paging, etc.)
- A third parameter lets you create your own parameters and pass them to the call. (params DbParameter[] explicitParameters)
- Output parameters are supported via explicitParameters.
- Table Valued Parameters in SQL Server are available in the Susanoo.SqlServer nuget package.
-
Connection
- Susanoo handles command life-cycle for you in most cases, but you can take control at any time.
- Shared connections allow for connection specific features such as Temp Tables in SQL Server.
- Full transaction support via System.Transactions.TransactionScope
-
Performance
- Mappings are compiled BEFORE execution and cached which is one of several performance features that make Susanoo blazing fast.
- Dynamic mapping uses a custom object structure designed to play well and fast with ADO.NET
- The Dynamic mapping object DynamicRow can be directly mapped to for additional performance avoiding dynamic, but still refraining from maintaining a POCO.
-
Usability
- Fluid fluent syntax
- Deferred execution
- Simplified parameter handling
- Lower risk than other solutions of left open connections.
- An exceptionally good fit for repository and unit of work patterns. (We call them Contexts)
-
Command Modifiers (For CommandType.Text Only)
- .BuildWhereFilter wraps a provided SQL statement in a new select with a Where clause built from properties on a filter instance.
- .AddOrderBy Expression allows passing a parameter that gets injected into the wrapped SQL statement before execution and NOT included in parameter list.
- .OffSetFetch in Susanoo.SqlServer allows for SQL Server 2012 syntax of paging results, along with OrderBy and where filter, server-side data grids are cake.
-
Extensibility
- Single entry point, CommandManager allows for less feature confusion.
- Bootstrapper interface and class provide an easy way to override or extend core functionality
- Custom mappings are registered in the bootstrapper.
- Single responsibility interfaces at every step of command definition are easy extension points for extension methods.
- A command modifier pipeline allows registering delegates/methods to adjust command text, command type, and parameters just before execution
-
Debugging
- Execution and mapping exceptions funnel into an overridable method in the bootstrapper OnExecutionException and provide command text and parameters involved.