Reputation: 3209
I am trying to use EntityType class, but I get an error when I try to use it. I did some digging and it appears I need to use this System.Data.Metadata.Edm.
I tried this...
using System.Data.
and I enter the . Metadata does not appear as an option....any suggestions
I am new at this.
I am using .NET Framework 3.5
Upvotes: 8
Views: 8722
Reputation: 21
Please use the following namespace if you are upgrading from EF5 to EF6 Replace System.Data.Metadata.Edm.RelationshipMultiplicity with System.Data.Entity.Core.Metadata.Edm.RelationshipMultiplicity, need not change anything else apart from above because it solves my problem
Upvotes: 0
Reputation: 1
If you're using EF6, then you need to add a reference to System.Data.Entity.dll
After than you must include the namespace System.Data.Entity.Core
Basically, from EF6 all classes in System.Data have been moved to System.Data.Entity.Core.
Upvotes: 0
Reputation: 171
if you use EF6, you should using System.Data.Entity.Core.Metadata.Edm.
Upvotes: 17
Reputation: 2720
You need to add the reference System.Data.Entity.dll.
You can also check which assembly is need to some class in msdn
For example, for the EntityType:
http://msdn.microsoft.com/en-us/library/system.data.metadata.edm.entitytype.aspx
And you will see there the information about the assembly:
Assembly: System.Data.Entity (in System.Data.Entity.dll)
Upvotes: 7
Reputation: 46929
Make sure you have referenced System.Data.Entity.dll
in your project.
Upvotes: 4