C # using System.Data.Metadata.Edm

I try to use the EntityType class, but I get an error when I try to use it. I did some digging and it seems to me I need to use this System.Data.Metadata.Edm.

I tried this ...

using System.Data.

and I enter. Metadata is not displayed as an option .... any suggestions

I am new to this.

I am using the .NET Framework 3.5

+7
source share
5 answers

if you are using EF6 you should use System.Data.Entity.Core.Metadata.Edm.

+15
source

You need to add the link System.Data.Entity.dll.

You can also check what assembly some class needs in msdn

For example, for EntityType:

http://msdn.microsoft.com/en-us/library/system.data.metadata.edm.entitytype.aspx

And you will see the assembly information there:

Build: System.Data.Entity (in System.Data.Entity.dll)

+7
source

Make sure you include System.Data.Entity.dll in your project.

+3
source

If you are using EF6, you need to add a link to System.Data.Entity.dll

After you must include the System.Data.Entity.Core namespace

Basically, from EF6 all classes in System.Data have been ported to System.Data.Entity.Core.

0
source

Please use the following namespace if you are switching from EF5 to EF6 Replace System.Data.Metadata.Edm.RelationshipMultiplicity with System.Data.Entity.Core.Metadata.Edm.RelationshipMultiplicity, you do not need to change anything except as above, because it solves my problem

0
source

All Articles