mysql - How to use unsigned int / long types with Entity Framework? -
mappings a property to use that entity framework After a little bit of thinking, I thought an easy solution to this problem: simply enter the data in the supported Casting Hope it helps someone to stop the overstalla exceptions. Ulm data types are omitted by the eF provider of mysql how a
unsigned Does not support data types For the
uint column, any one can store the value in a signed data type with a large range (i.e., a
long ) is. About
ulong column? The general solution could not work for me because there is no EF-supported signature data type that can hold
inverted code without any overflow.
long type and if it is accessed then
ulong Enter . You might have been thinking: "But wait, Ulong's maximum value & gt; maximum value for long!" You can still store a Ulux bytes in the long run, and then when you need it, revert it, as both of them have 8 bytes. It allows you to save a vulgar variable for a database through EF will allow.
// Avoid modifying the following directly // Only used as a database column Public long __MyVariable {received; Set; } // Access / modify this variable. // Tell EF to not map this field to the DB table [Notepad] Public ULLL Permanent {Receive {uncheck (return) __Mearnal;}} set {uncontrolled {__MyVariable = (long) value; < / P>
has been unchecked .
Comments
Post a Comment