IdentityServer4 with MySql and Dot Net Core - No coercion operator is defined between types 'System.Int16' and 'System.Boolean'

.net-core c# entity-framework-core mysql

Question

I am working on the IdentityServer4 with MySQL and .NET Core.

When I generate the token using the link, I get the below attached error.

I converted all the Boolean fields to short.

modelBuilder.Entity<Patient>()
    .Property(r => r.IsDeleted)
    .HasConversion(new BoolToZeroOneConverter<short>());

enter image description here

1
1
2/26/2019 10:04:27 AM

Popular Answer

It appears that you're encountering a known bug: https://bugs.mysql.com/bug.php?id=92987

On the similar issue https://bugs.mysql.com/bug.php?id=93028, people have reported success by switching away from MySql.Data.EntityFramework to Pomelo.EntityFrameworkCore.MySql (an alternative OSS EF.Core implementation for MySQL). Otherwise, you may just have to wait for Oracle to fix the issue.

0
2/26/2019 6:09:45 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow