Why does Dapper update MySQL differently from SQL Server? When an entity field value is not set, the MySQL database will update the field according to its default value.So how can I deal with this different logic, I also want to support these two databases by using same piece of c# code.
For example, if there is a 'created_time' field in the entity field in mysql database, and the entity object does not assign a value to the 'created_time' field during the update operation, then this field will be filled with the default value. But SQL Server database does not operate in this way. It defaults to ignoring updates to this field if the entity object does not contain the 'created_time' field.
How can I fix this issue and try to make the program code support both databases as much as possible.