Songhay Data Access Ready for CodePlex.com!
I actually need this for my current work:
- I removed the
Songhay.DataAccess.Runner
namespace from theSonghay.DataAccess
project. - I’ve renamed the old
Songhay.DataAccess.Runner
project toSonghay.DataAccess.Runner-Console
(this might be a new convention going forward). - I’ve generated a new
Songhay.DataAccess.Runner
project with the removed assets from theSonghay.DataAccess
project
Now that the DAR stuff is cleanly separated from the System.Data.Common
stuff, my generic data access routines that date back to .NET 2.0 is ready for the public.
Songhay Data Access
Songhay Data Access is a set of static helper classes defining routines around System.Data.Common
. As of this writing Songhay Data Access has been used with SQLite, MySQL and SQL Server, but, in theory, this set of libraries will work with any database that has an ADO.NET provider written for it.
Here are some of the highlights:
- Gets a
Common.DbConnection
object from a provider name and connection string (inCommonDbms
). - Converts a generic Dictionary into an array of
IDataParameter
(inCommonParameter
). - Returns a string or an object with an
IDbConnection
and a SQL statement (inCommonScalar
). - Returns an instance of
IDataReader
with anIDbConnection
and a SQL statement (inCommonReader
). - Returns an
XPathDocument
with anIDbConnection
and a SQL statement (inCommonReader
). - Full support for parsing Nullable generics with overloads for custom default values (in
FrameworkTypeUtility
).
Most “normal” .NET developers, starting out with .NET 1.x or 2.x, live almost exclusively in the world of System.Data.SqlClient
to meet data-access needs. I was drawn to System.Data.Common
from the very beginning because Microsoft’s work in this namespace represents ‘the sequel’ to ODBC—of the olden days of COM when Don Box was but a young Jedi. Writing helpers for System.Data.Common
seems like, um, “common” sense to me, while investing heavily in System.Data.SqlClient
is a bold declaration that all databases on your watch will be SQL Server for ever more.
I was very pleased to find out that the Entity Framework is based on System.Data.Common
. Songhay Data Access is my tiny alternative to the Entity Framework, when I need to get as close to the DBMS as .NET will allow.