-
Notifications
You must be signed in to change notification settings - Fork 1
How do I add support to another ADO.Net client?
Zohar Peled edited this page Aug 17, 2017
·
2 revisions
If you want to add support to another client implementation (for instance, MySqlClient
), you will need to do the following:
- Add a property for that client in the private struct
DbTypeMap
(in DBTypeConverter.cs file). - Add an internal extension method to convert to that type in this class like
ToDbType()
(in DBTypeConverter.cs file). - Add mapping to that type in the static constructor of DBTypeConverter (in DBTypeConverter.cs file). (this is going to be time consuming... don't say I didn't worn you!)
- Add a class inheriting the
DBHelper
class (likeSQLDBHelper
,OleDbDBHelper
andOdbcDBHelper
).
In this class, override the virtualCreateParameter
method, and you might also want to override theFillDataTable
method. - Add a value to the
DataBaseType
enum (in DBHelperFactory.cs file). - Add a case for this new value inside the
GetInstance
method of theDBHelperFactory
class (in DBHelperFactory.cs file).