This project is read-only.

Mapping relations

C# Property Defination Sql Server Column Type
int Column int
long Column bigint
short Column smallint
byte Column tinyint
Guid Column uniqueidentifier
bool Column bit
DateTime Column datetime
decimal Column decimal
float Column real
double Column float
byte[] Column binary
string Column ntext
[StringColumn(IsUnicode = false)]string Column text/varchar(max)
[Length(30)]string Column nvarchar(30)
[StringColumn(IsUnicode = false), Length(30)]string Column varchar(30)

It only shows the mapping for SqlServer, other database please find it by yourself.

Last edited Apr 9, 2014 at 10:51 AM by lifeng, version 11


lifeng Jan 14, 2013 at 1:23 AM 

garfieldzf Jan 13, 2013 at 7:59 AM 
in sqlite db I wanna to define a money property, what type property I define in C# cs. I use byte[] now ,but it maps to BLOB,varbinary, money etc
There are Data Annonation and FluentAPI in EF orm tools if I want to set the db type.