The corresponding relationship between the Dal and the database type

Source: Internet
Author: User
Tags mssql server

MSSQL Server Type DbType type C # types MySQL type DbType type C # types
bit boolean bool   bit (1) boolean bool
tinyint byte byte   bit uint64 ulong
smallint int16 short   tinyint (1) boolean bool
int int32 int   tinyint byte byte
bigint int64 long   smallint short short
real single float   int int32 int
float double double   bigint int64 long
money decimal decimal   decimal currency decimal
numeric decimal decimal   double double double
decimal currency decimal   float single float
smallmoney currency decimal   char (1) ansistringfixedlength char
date date datetime   char ansistringfixedlength string
time time timespan   varchar ansistring string
datetime datetime datetime   date datetime datetime
smalldatetime datetime datetime   datetime datetime datetime
datetime2 datetime datetime   time time timespan
datetimeoffset datetimeoffset datetime   timestamp datetime datetime
timestamp binary byte[]   year int16 short
char (1) ansistringfixedlength char   binary binary byte["
char ansistringfixedlength string   text string string
varchar ansistring string        
nchar stringfixedlength char        
nvarchar string string        
text string string        
ntext string string        
image binary byte[]        
binary binary byte[]        
uniqueidentifier guid guid        
image binary byte[]        
sql_variant object object        
Xml Xml String

The corresponding relationship between the Dal and the database type

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.