Sybase NHibernate Core - ASE Native driver or DataAction #2741
Replies: 1 comment
-
Check if no one has already written and publish on Nuget a NHibernate driver for this. If it is not the case, write your own. Writing a NHibernate driver does neither require advanced knowledge, nor many lines of code. It is just a kind of helper for NHibernate to be able to instantiate adequate connections or commands classes. In order to avoid taking hard dependencies on DB providers, most NHibernate drivers use a reflection based approach. Since there is already a base class for this for ASE, you may just derive from it and provide it the appropriate assembly and classes names, see But in your case there is not much value in avoiding taking a hard dependency on the driver. It is instead the contrary: if you write a specific project for this driver, better take an explicit dependency on it, and then just directly implement nhibernate-core/src/NHibernate/Driver/SybaseAseClientDriverBase.cs Lines 45 to 52 in 07ecb9f Your driver may also implement IEmbeddedBatcherFactoryProvider if you want to enable batching and if there is an adequate batcher for ASE. (The NHibernate.AdoNet.GenericBatchingBatcherFactory works likely with ASE.)
|
Beta Was this translation helpful? Give feedback.
-
Does NHibernate Core work with Sybase (SybaseAdoNet4Driver) - I assume it doesn't because the Sybase.AdoNet4.AseClient driver does not seem to support .Net core.
I found a DataAction Ado driver (AdoNetCore.AseClient - https://github.com/DataAction/AdoNetCore.AseClient) which can connect .Net Core to Sybase 15.7.. BUT is there any way to get this driver to work with NHibernate?
Beta Was this translation helpful? Give feedback.
All reactions