类型映射

类型映射

C# SqlServer MySql Oracle PostgreSQL SQLite
byte tinyint int NUMBER(3,0) int2 TINYINT
short smallint int NUMBER(4,0) int2 SMALLINT
int int int NUMBER(9,0) int4/serial4 INT/INTEGER
long bigint bigint NUMBER(18,0) int8/serial8 INT64
float float float BINARY_FLOAT float4 FLOAT
double real double BINARY_DOUBLE float8 DOUBLE
decimal decimal decimal NUMBER decimal NUMERIC
bool bit int NUMBER(9,0) boolean BOOL
DateTime datetime datetime DATE timestamp DATETIME
string varchar/nvarchar varchar VARCHAR/NVARCHAR2 varchar VARCHAR/NVARCHAR
Guid uniqueidentifier varchar - uuid GUID
Enum int int NUMBER(9,0) int4 INT