Mapping SQL Server Data Type to Entity Framework

I need to know the equivalent SQL Server datatypes for EF. I found 2 similar links online, but their definitions seem inconsistent. Which link should I use if I am using Entity Framework?

1) Mapping data types in ADO.NET

http://msdn.microsoft.com/en-us/library/cc716729%28v=vs.110%29.aspx

2) SQL Server data types in .NET Framework

http://msdn.microsoft.com/en-us/library/ms131092.aspx

+3


source to share


1 answer


None of them.

The Entity Framework maps SQL Server data types to conceptual model types ("Edm types") . The mapping can be found here:



Edm types, in turn, are converted to .NET types in a simple way (Boolean → Boolean, Int32 → Int32, Binary → Byte array, etc.) and can be found in the referenced code:

+3


source







All Articles