EF属性类型对应数据库sql server类型

https://www.entityframeworktutorial.net/code-first/configure-one-to-many-relationship-in-code-first.aspx#conventions-for-one-to-many-ef6

The following table list C# data type mapped with SQL Server data type.

C# Data TypeMapping to SQL Server Data Type
int int
string nvarchar(Max)
decimal decimal(18,2)
float real
byte[] varbinary(Max)
datetime datetime
bool bit
byte tinyint
short smallint
long bigint
double float
char No mapping
sbyte No mapping
(throws exception)
object No mapping
posted @ 2020-08-15 16:29  竹林听雨行  阅读(694)  评论(0编辑  收藏  举报