-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration to .net5 issue #7
Comments
Hi @taconaut - are you running this from code? Have you tried running it from code, rather than the nuget package? I don't have any short-term plans per-se, other than to fix any issues that come up. |
Great library. I will try making it compatible with EF Core 5.0 but can't promise I will succeed. There are some breaking changes that might be a deal breaker for making this library compatible without investing much time in it. |
@Adam-Langley I've tdone following:
-> Result is the same @stzoran1 Hope you succeed :) |
Found the reason, the Currently implemented: Newly required: |
Yes, that is one of the reasons. Biggest issue is Print method which is now protected and can't be overridden. |
@stzoran1
@Adam-Langley Isn't there a way to access wanted functionality through public methods instead of using reflection? Or should a request be submitted that these constructor/method be made public? |
@taconaut you are right. I overlooked that related to protected Print. |
@taconaut I invested some time to resolve this but got stuck at very same point as you. Any progress on your side? |
@stzoran1 I haven't tried any further as we don't want to migrate our application just yet. I guess the next step would be to understand the changes in the signature of the internal method |
@taconaut you are happy you are waiting with upgrading. My project owner insisted to switch to 5.0 immediately after release. Now we are struggling with bugs. I fixed one library related to temporal tables and made contribution. But this will be more challenging. I plan to download EF Core repository and to use it inside my project instead of NUGET package in order to get better overview what is going on under the hood. |
Hi guys, Sorry to see you're having trouble with this. Please note that even the original code needed to use private APIs - MS hasn't yet made it possible to support temporal query code generation without doing so. It is on their road map - but until then, you're going to get these kinds of breakages when upgrading. |
I setup test project using Rider this morning in order to get better debugging options. This revealed what is causing issue: So this library is creating AsOfTableExpression which is not supported in SqlNullabilityProcessor's Visit method. I will try resolving this. If anyone have some ideas please share. |
SqlNullabilityProcessor is a new class in EF Core 5.0.0. It was not used in 3.1.x |
I failed to trace it. So many changes in EF Core 5 which are affecting this library. |
@stzoran1 I haven't used Rider, but in VS you can disable the debug option 'just my code' and enable braking on exception. When the exception is being thrown (and the debugger halts) I'd expect to figure something out from the call stack your in. Is this what you tried? |
@taconaut yes, I know for this option, but on my side this is sometimes working and sometimes not. Never mind, this is not too important. Important thing is that EF Core team added new class to check Expression type and all unknown expression types are rejected. I am stuck there and have no idea at the moment how to resolve it. |
@stzoran1 I'd try checking the ef-core issues here on github to see if a relevant issue exists and create a new one if it doesn't. Sorry I can't be of more help but for these tasks you know when you start but not when you're going to get them fixed. |
@taconaut you are right. Thank you for your help. Please let me know if you find something in ef-core issues. |
I found a workaround to intercept the SqlNullabilityProcessor. Normally it would throw in case of unkown TableExpressions.
You need to register it as follows:
|
@tonithenhausen it is looking as a good patch for SqlNullabilityProcessor issue. I will try it later this week. Thank you. |
Also I found out that the
Also in the
|
@tonithenhausen I tried approach you proposed but with no success. May you please specify where to register singleton? Is it important to register it before or after some other service? Do I need to make other changes in library to implement your solution? |
@stzoran1 I am using efcore-temporal-query with https://github.com/findulov/EntityFrameworkCore.TemporalTables. My code is as follows:
|
As I have modified the source code of your package and the https://github.com/findulov/EntityFrameworkCore.TemporalTables as well, I could upload my modified source code to Github if you like. |
@tonithenhausen thank you for quick reply. I am using the same. I managed to fix Findulov's library but still struggling with this one. It would be great if you can upload the code or even make fork with your version. Thank you in advance. |
@stzoran1 I have uploaded the code to: https://github.com/tonithenhausen/EntityFrameworkCore.TemporalTables |
@tonithenhausen Thank you, I will check it on Monday and get back to you. |
@tonithenhausen Thanks for sharing your findings. It's not clear to me from the comments if your fixes restore 100% of the functionality. Is there more work to be done or could this be upstreamed soon? |
@rdeprins I am currently using the code from https://github.com/tonithenhausen/EntityFrameworkCore.TemporalTables in a production EF Core 5 application. However, I made modifications to apply As OF filtering to .Include(...) queries. Not sure if this was working before with EF Core 3. |
Hi,
For testing purposes, I've tried to update our project to .net5. This only required to change the target framework to net5.0 and updating the referenced nuget packages. After this, the project could be built.
When running it, I get an exception when adding the DbContext and enabling temporal table queries:
Exception details:
Do you plan on supporting .net 5?
The text was updated successfully, but these errors were encountered: