Breeze / breeze.server.net

Breeze support for .NET servers
MIT License
76 stars 62 forks source link

'System.MissingMethodException' occurred in Breeze.Persistence.dll #102

Closed GioviQ closed 3 years ago

GioviQ commented 3 years ago

An exception of type 'System.MissingMethodException' occurred in Breeze.Persistence.dll but was not handled in user code Method not found: 'Microsoft.EntityFrameworkCore.Metadata.INavigation Microsoft.EntityFrameworkCore.ChangeTracking.NavigationEntry.get_Metadata()'.

This happens after .Net 5 Migration

steveschmitt commented 3 years ago

Thanks for reporting this. Looks like we have work to do for .NET 5.

shunty-gh commented 3 years ago

I've just taken a local copy of the Breeze.Persistence.EFCore files for a tentative upgrade of our project to .net5 / EF Core 5 and found that the changes needed are minimal, at least for our use of Breeze. I know I should provide a pull request but I also realise that there's a lot more to it than just a couple of code changes - such as backward compatibility, tests etc etc. I don't claim to have done any more than check that it saves edits on single entities in our particular code base. However, in case anyone is interested I'll list the changes here:

I'm not sure if the changes are required specifically for .net5 or rather for EF Core 5. I think, probably, the latter but haven't checked. The changes are enough to get everything working as expected in our application. YMMV.

In the immortal words of many a time constrained developer - "if it compiles, ship it" ;-)

GioviQ commented 3 years ago

In future I think I will use https://github.com/ChilliCream/hotchocolate because It is not clear the Breeze roadmap.

jtraband commented 3 years ago

.NET 5 versions have been published.

All of the below now have a version 5.0.2... or later

Breeze.AspNetCore.NetCore Breeze.Core Breeze.Persistence Breeze.Persistence.EFCore

These are all based on .NET 5 and the EFCore is based on EFCore 5.