MRCollective / NHibernate.SqlAzure

Reliable NHibernate connection to SQL Azure using the Microsoft Transient Fault Handling library.
Other
37 stars 30 forks source link

How about a .Net Core / netstandard version #32

Open mduu opened 4 years ago

mduu commented 4 years ago

Hi,

This library looks exactly like to one we need but we are on .Net Core / NetStandard. It seems this version is not compatible with NetStandard. Microsoft seems to have a .Net Core compatible version of EnterpriseLibrary.TransientFaultHandling.

Any plans on porting this library to .Net Core / NetStandard?

Cheers, Marc

robdmoore commented 4 years ago

No current plans, but more than happy to work with anyone who has the time and skills to do the port and get it shipped out.

--

On 11 May 2020, at 4:40 pm, Marc Dürst notifications@github.com wrote:

 Hi,

This library looks exactly like to one we need but we are on .Net Core / NetStandard. It seems this version is not compatible with NetStandard. Microsoft seems to have a .Net Core compatible version of EnterpriseLibrary.TransientFaultHandling.

Any plans on porting this library to .Net Core / NetStandard?

Cheers, Marc

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

JustinasS commented 4 years ago

@mduu I have made a fork targeting netstandard. At the moment NHibernate does not have implementation for SqlClientBatchingBatcher which is used by this driver. So used GenericBatchingBatcher which is less performant.

@robdmoore Can you explain the process of shipping it out? I could do it if I see I am capable of it.

robdmoore commented 4 years ago

When you say "less performant" what's the implication? It's been a while since I looked at the library so can't really remember what SqlClientBatchingBatcher does or where it came from (e.g. inside of NHibernate or elsewhere).

In terms of shipping, let's start with a pull request to this project so we can all inspect the diff and decide the best way to merge it in (for instance I think this is a logical time to make a clean break and remove all of the legacy NHibernate packages we build for the project etc.). Once it's merged the CI/CD we have attached to this project makes it easy to release.

JustinasS commented 4 years ago

Batchers implementation comes from NHibernate. SqlClientBatchingBatcher is available only for the dotnet framework runtime. I do not know what actual performance difference is between SqlClientBatchingBatcher and GenericBatchingBatcher. Although on NHibernate repo one of the classes used by SqlClientBatchingBatcher has comment: https://github.com/nhibernate/nhibernate-core/blob/02fc5294bb8948e48bb05c0bed1a17cd5443818c/src/NHibernate/AdoNet/SqlClientSqlCommandSet.cs#L12-L19

I have created a draft pull request.

dsibinski commented 2 years ago

This feature would help a lot! Would love to use it with NHibernate in .NET 6 ;)