Entity Framework Core / Value Conversion "InvalidCastException" boolean to int

c# db2 entity-framework-core

Popular Answer

The only solution we found for the same problem was to turn off value conversion and create our own properties with the same name but different types. The compiler issues a warning, but this was the only way we were able to get it to work.

public class ApplicationUser : IdentityUser {

    //Hack: Used as a workaround with DB2's data types
    public int LockoutEnabled { get; set; }
    public int EmailConfirmed { get; set; }

}
0
10/25/2018 12:23:16 AM


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