问题
Entity framework just ignores unsigned decimal column when doing db-first to generate code, since I can't change the data type of the db column to signed, any solution?
回答1:
Do you need to "enforce" non-negative values? Use a TRIGGER
.
Or, if the values are whole numbers, then use some suitably sized INT UNSIGNED
in place of DECIMAL
.
来源:https://stackoverflow.com/questions/34566718/entity-framework-support-for-mysql-unsigned-decimal