Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

[MySQL 5.7]InvalidCastException: Unable to cast object of type 'System.Boolean' to type 'System.Int16'. #7350


User avatar
0
pradeep created

Hi, We recently setting up the asp.net zero project with MySQL 5.7 and entity framework core.

When we run the project, we are facing following exception while inserting the data with boolean field. It is happening for edition table. Following is the exception,

** InvalidCastException: Unable to cast object of type 'System.Boolean' to type 'System.Int16'. ** When we analyze, we see isDeleted property is the only one exists as boolean.

Please advise on fixing this issue as early as possible.


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    What is the mysql EF Core driver you are using? Pomelo.EntityFrameworkCore.MySql?