zzzprojects / EntityFramework-Classic

Entity Framework Classic is a supported version of the latest EF6 codebase. It supports .NET Framework and .NET Core and overcomes some EF limitations by adding tons of must-haves built-in features.
https://entityframework-classic.net
Other
103 stars 27 forks source link

Saving with a DB error results in Secure binary serialization is not supported on this platform #9

Closed rogerfar closed 5 years ago

rogerfar commented 5 years ago

I'm doing a SaveChanges on an object which contains an error (invalid reference to a FK object), but instead of throwing the actual error it throws:

System.PlatformNotSupportedException: 'Secure binary serialization is not supported on this platform.

If I change my SaveChanges in await SaveChangesAsync it swallows the error and hangs forever.

This is on the latest version with a .NET Core 2.1 project.

Stacktrace:

at System.Exception.add_SerializeObjectState(EventHandler`1 value) at System.Data.Entity.Internal.InternalContext.WrapUpdateException(UpdateException updateException) at System.Data.Entity.Internal.InternalContext.SaveChanges()

JonathanMagnan commented 5 years ago

Hello @farlock85 ,

Thank a lot for reporting, we should look at it within a few hours to try to reproduce it.

Best Regards,

Jonathan

JonathanMagnan commented 5 years ago

Hello @farlock85 ,

The v7.0.14 has been released.

The issue was caused because .NET Core has dropped the support of some binary serialization object that was previously supported in the .NET Framework.

Let me know if everything works as expected.

Best Regards,

Jonathan

rogerfar commented 5 years ago

Hello @JonathanMagnan, works perfectly!

Thanks