Reputation: 353
I need to know the equivalent SQL Server data types for EF. I found 2 similar online references, but their definitions appear inconsistent. Which reference should I refer to if I'm using Entity Framework?
1) Data Type Mappings in ADO.NET
http://msdn.microsoft.com/en-us/library/cc716729%28v=vs.110%29.aspx
2) SQL Server Data Types in the .NET Framework
http://msdn.microsoft.com/en-us/library/ms131092.aspx
Upvotes: 4
Views: 17499
Reputation: 172468
Neither of those.
Entity Framework maps SQL Server data types to conceptual model types ("Edm types"). The mapping can be found here:
Edm types in turn translate to .NET types in a straightforward way (Boolean -> Boolean, Int32 -> Int32, Binary -> Byte array, etc.) and can be found in the reference code:
Upvotes: 6