8

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

1
  • have you ever found a solution? I have the same issue for .net 4.0. System.Data.Entity.dll is referenced, but "using System.Data.Metadata.Edm;" doesn't work. Commented Jul 9, 2013 at 8:55

5 Answers 5

17

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

Sign up to request clarification or add additional context in comments.

Comments

7

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)

3 Comments

I add the reference, but it still does not show MetaData or Entity or anything. Do I have to restart the program?
how do I find that out? When I say I am new, I mean new new
Ok, you need to give us some more information. How did you add the reference? By using the "Add reference..." option? What are you trying to do with it? I believe it should work also on 3.5, but the link I gave you was based on version 4.0.
4

Make sure you have referenced System.Data.Entity.dll in your project.

1 Comment

I add the reference, but it still does not show MetaData or Entity or anything. Do I have to restart the program?
0

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.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.