I was asked by @karelz to sum up my biggest holes I found while working on _FirebirdClient_ on .NET Standard 1.6. These would be nice to process before .NET Standard/Core 2.0.
Some of these are/might be already fixed or not worth doing. I provide whole list (in no particular order) as a reference.
DbException is missing ErrorCode property. I know it was originally based around HRESULT, but it might be good to have common property for _error codes_.DbParameter does not have Precision and Scale properties.TypeCode.DBNull. There's a case for it in FbParameter (implementation of DbParameter).IEnlistmentNotification and around.DbConnection does not have DbProviderFactory.DbDataAdapter, DbCommandBuilder and the whole fun around this. I personally don't think the DbDataAdapter, ... is needed.DbDataAdapter, DbCommandBuilder are now available in netstandard2.0|DataDirectory| in connection strings.DataTables etc.DbConnection.GetSchema(): DataTable and DbDataReader.GetSchemaTable() : DataTable are in System.Data.Common in netstandard2.0Related to dotnet/runtime#21803.
_FirebirdClient_ sources are here, if needed.
@saurabh500 @corivera can you please review the list and identify 2.0-critical feedback (if any)? Thanks!
Thank you @cincuranet!
cc more Data experts for opinions @FransBouma @NickCraver @roji
@cincuranet
DbException is missing ErrorCode property. I know it was originally based around HRESULT, but it might be good to have common property for error codes.
It looks like DbException is passing ErrorCode down to it's base class, which exposes ErrorCode
DbParameter does not have Precision and Scale properties.
Implemented in 2.0.0
DbConnection does not have DbProviderFactory.
It does actually, it's protected virtual: https://github.com/dotnet/corefx/blob/master/src/System.Data.Common/src/System/Data/Common/DbConnection.cs#L36
FYI have just made npgsql target netstandard20 without any issues as far as I can tell. Did not run into most of the issues mentioned above by @cincuranet (did you target netstandard20 or an earlier version?). The codebase is now littered with #if !NETSTANDARD1_3 which is fine.
Great feedback @roji, thank you!
Based on the title of this issue, the feedback is based on the differences between netstandard1.6 and NetFx.
Taking a first pass at answering the questions
EDIT: List with answers moved to top post (+ reformatted)
@roji
It's not .NET Standard 2.0, it's my notes from 1.6 (written in description). Didn't had much free time yet to do 2.0 on _FirebirdClient_.
@FransBouma
Great. I can mark these as done.
@cincuranet I have created a copy of your checklist and added comments to them in my reply. Right now support for expansion of |DataDirectory| is not available. All else is available in 2.0 (with lack of support for distributed transactions in System.Transactions )
Is |DataDirectory| support a must for 2.0 ? This can be worked around by managing the ConnectionStrings with the absolute path for different environments. Not an ideal solution, but its a workaround. Let me know what you think?
@saurabh500
Ah, we missed each other in the updates.
I personally don't feel the |DataDirectory| is a showstopper. Only few years back it was implemented in _FirebirdClient_ because somebody asked for it. So I don't think people needed it that much. :)
@saurabh500 I moved your answers into top post - one copy is easier to maintain. As soon as we don't delete original content, making edits to top posts is fine (if it helps collaboration).
Sounds good. Thanks for the feedback. I am going to close this issue as the only open item is the |DataDirectory| support which is being tracked by another issue and we are planning it post 2.0
@cincuranet If you have the bandwidth to migrate to netstandard2.0 and face any issues, let us know.
Thanks @karelz
@cincuranet did you run it on top of .NET Core 2.0 Preview 1 while targeting .NET Standard 1.6?
Or did you use older .NET Core 1.1 for your testing?
@cincuranet If you have the bandwidth to migrate to netstandard2.0 and face any issues, let us know.
Probably not in a reasonable timeframe for you.
@cincuranet did you run it on top of .NET Core 2.0 Preview 1 while targeting .NET Standard 1.6?
Or did you use older .NET Core 1.1 for your testing?
1.1. My notes were from pre-2.0-preview1 time.
@cincuranet is there a chance to just run your netstandard1.6 on top of .NET Core 2.0?
You shouldn't need to change any of your code, just run it on our latest bits. It would be great help to increase our confidence in the product.
BTW: Retargeting netstandard2.0 should be also super-simple (assuming you won't remove any ifdefs) - but it is probably 10-30mins extra work on top of just running tests on .NET Core 2.0.
@cincuranet is there a chance to just run your netstandard1.6 on top of .NET Core 2.0?
You shouldn't need to change any of your code, just run it on our latest bits. It would be great help to increase our confidence in the product.
I can confirm vanilla (netstandard1.6) _FirebirdClient_ works on netcoreapp2.0.
Awesome! Thanks a lot for your help @cincuranet!
BTW: Retargeting netstandard2.0 should be also super-simple (assuming you won't remove any ifdefs) - but it is probably 10-30mins extra work on top of just running tests on .NET Core 2.0.
OK, I took an early start of the day today and did the port. 馃槄 Quick'n'dirty style. It was closer to 90 minutes, mostly because of getting fresh VS 15.3 and the intertwined ifdefs in the code. Other than that it was really smooth and there was nothing I had to rewrite completely or again to make it work on netstandard2.0. The tests ran fine as well.
That's a good confidence booster, I think.
Absolutely, thanks for trying it out and increasing our confidence in the bits!
Most helpful comment
FYI have just made npgsql target netstandard20 without any issues as far as I can tell. Did not run into most of the issues mentioned above by @cincuranet (did you target netstandard20 or an earlier version?). The codebase is now littered with
#if !NETSTANDARD1_3which is fine.