.Provider di dati Microsoft .NET Framework per tipi SQL Server (Entity Framework)

Il file manifesto del provider di dati .NET Framework per SQL Server (SqlClient) include l'elenco dei tipi primitivi del provider, dei facet per ogni tipo, dei mapping tra i tipi primitivi del modello concettuale e del modello di archiviazione e delle regole di promozione e conversione tra i tipi primitivi del modello concettuale e del modello di archiviazione.

Nella tabella seguente vengono descritti i tipi per i database di SQL Server 2005 e SQL Server 2000 e viene illustrato come questi tipi eseguano il mapping ai tipi Entity Data Model (EDM). Sono stati introdotti alcuni nuovi tipi in SQL Server 2005 che non sono supportati in SQL Server 2000. Tali tipi sono segnalati nella tabella riportata di seguito.

Nome tipo di provider Attributi tipo di provider Nome tipo EDM Facet tipo EDM

bit

n/d

Boolean

n/d

tinyint

n/d

Byte

n/d

smallint

n/d

Int16

n/d

int

n/d

Int32

n/d

bigint

n/d

Int64

n/d

float

n/d

Double

n/d

real

n/d

Single

n/d

decimal

n/d

Decimal

Nome facet Nome attributo Valore

Precisione

Minimo

Massimo

Valore predefinito

Costante

1

38

18

False

Scala

Minimo

Massimo

Valore predefinito

Costante

0

38

0

False

numeric

n/d

Decimal

Nome facet Nome attributo Valore

Precisione

Minimo

Massimo

Valore predefinito

Costante

1

38

18

False

Scala

Minimo

Massimo

Valore predefinito

Costante

0

38

0

False

smallmoney

n/d

Decimal

Nome facet Nome attributo Valore

Precisione

Valore predefinito

Costante

10

True

Scala

Valore predefinito

Costante

4

True

money

n/d

Decimal

Nome facet Nome attributo Valore

Precisione

Valore predefinito

Costante

19

True

Scala

Valore predefinito

Costante

4

True

binary

n/d

Binary

Nome facet Nome attributo Valore

MaxLength

Minimo

Massimo

Valore predefinito

Costante

1

8000

8000

False

FixedLength

Valore predefinito

Costante

True

True

varbinary

n/d

Binary

Nome facet Nome attributo Valore

MaxLength

Minimo

Massimo

Valore predefinito

Costante

1

8000

8000

False

FixedLength

Valore predefinito

Costante

False

True

varbinary(max)

NoteNota

Questo tipo non è supportato

in SQL Server 2000.

n/d

Binary

Nome facet Nome attributo Valore

MaxLength

Valore predefinito

Costante

214748364780

True

FixedLength

Valore predefinito

Costante

False

True

image

n/d

Binary

Nome facet Nome attributo Valore

MaxLength

Valore predefinito

Costante

2147483647

True

FixedLength

Valore predefinito

Costante

False

True

timestamp

n/d

Binary

Nome facet Nome attributo Valore

MaxLength

Valore predefinito

Costante

8

True

FixedLength

Valore predefinito

Costante

True

True

rowversion

n/d

Binary

Nome facet Nome attributo Valore

MaxLength

Valore predefinito

Costante

8

True

FixedLength

Valore predefinito

Costante

True

True

smalldatetime

n/d

DateTime

Nome facet Nome attributo Valore

Precisione

Valore predefinito

Costante

0

True

datetime

n/d

DateTime

Nome facet Nome attributo Valore

Precisione

Valore predefinito

Costante

3

True

date

NoteNota

Questo tipo non è supportato

in SQL Server 2005 e SQL Server 2000.

n/d

DateTime

Nome facet Nome attributo Valore

Precisione

Valore predefinito

Costante

0

False

time

NoteNota

Questo tipo non è supportato

in SQL Server 2005 e SQL Server 2000.

n/d

Time

Nome facet Nome attributo Valore

Precisione

Valore predefinito

Costante

7

False

datetime2

NoteNota

Questo tipo non è supportato

in SQL Server 2005 e SQL Server 2000.

n/d

DateTime

Nome facet Nome attributo Valore

Precisione

Valore predefinito

Costante

7

False

datetimeoffset

NoteNota

Questo tipo non è supportato

in SQL Server 2005 e SQL Server 2000.

n/d

DateTimeOffset

Nome facet Nome attributo Valore

Precisione

Valore predefinito

Costante

7

False

nvarchar

NoteNota

Questo tipo non è supportato

in SQL Server 2000.

n/d

String

Nome facet Nome attributo Valore

MaxLength

Minimo

Massimo

Valore predefinito

Costante

1

4000

4000

False

Unicode

Valore predefinito

Costante

True

True

FixedLength

Valore predefinito

Costante

False

True

varchar

NoteNota

Questo tipo non è supportato

in SQL Server 2000.

n/d

String

Nome facet Nome attributo Valore

MaxLength

Minimo

Massimo

Valore predefinito

Costante

1

8000

8000

False

Unicode

Valore predefinito

Costante

False

True

FixedLength

Valore predefinito

Costante

False

True

char

n/d

String

Nome facet Nome attributo Valore

MaxLength

Minimo

Massimo

Valore predefinito

Costante

1

8000

8000

False

Unicode

Valore predefinito

Costante

False

True

FixedLength

Valore predefinito

Costante

True

True

nchar

n/d

String

Nome facet Nome attributo Valore

MaxLength

Minimo

Massimo

Valore predefinito

Costante

1

4000

4000

False

Unicode

Valore predefinito

Costante

True

True

FixedLength

Valore predefinito

Costante

True

True

varchar(max)

n/d

String

Nome facet Nome attributo Valore

MaxLength

Valore predefinito

Costante

2147483647

True

Unicode

Valore predefinito

Costante

False

True

FixedLength

Valore predefinito

Costante

False

True

nvarchar(max)

n/d

String

Nome facet Nome attributo Valore

MaxLength

Valore predefinito

Costante

1073741823

True

Unicode

Valore predefinito

Costante

True

True

FixedLength

Valore predefinito

Costante

False

True

ntext

Nome attributo Valore

Confrontabile in termini

di uguaglianza

False

Confrontabile in termini

di ordinamento

False

String

Nome facet Nome attributo Valore

MaxLength

Valore predefinito

Costante

1073741823

True

Unicode

Valore predefinito

Costante

False

True

FixedLength

Valore predefinito

Costante

False

True

text

Nome attributo Valore

Confrontabile in termini

di uguaglianza

False

Confrontabile in termini

di ordinamento

False

String

Nome facet Nome attributo Valore

MaxLength

Valore predefinito

Costante

2147483647

True

Unicode

Valore predefinito

Costante

False

True

FixedLength

Valore predefinito

Costante

False

True

Unique

identifier

Nome attributo Valore

Confrontabile in termini

di uguaglianza

True

Confrontabile in termini

di ordinamento

True

Guid

n/d

xml

Nome attributo Valore

Confrontabile in termini

di uguaglianza

False

Confrontabile in termini

di ordinamento

False

String

Nome facet Nome attributo Valore

MaxLength

Valore predefinito

Costante

1073741823

True

Unicode

Valore predefinito

Costante

True

True

FixedLength

Valore predefinito

Costante

False

True

Vedere anche

Concetti

Tipi semplici (EDM)