I created a new model :
ADO.NET Entity Data Model
EF Designer from database .
When I changed the Code generation from T4 to Legacy objectContext
I got :
The type or namespace name 'EntityClient' does not exist in the namespace 'System.Data'
The type or namespace name 'Objects' does not exist in the namespace 'System.Data'
The type or namespace name 'EdmSchemaAttribute' could not be found
Any idea how can I resolve this?
Looks like you need to add the EF 6.0 DbContext Generator, as your current template is generating EF 5.0 code. See @boindil's answer.
I think your problem is, that your T4 templates, which generate the entitties and the context are still in EF version 5.
First you have to delete the current code generation items, which are in the code behind of the model, namely .Context.tt and .tt.Next add a new EF version 6 code generator with Right click in the model designer-> Add Code Generation Item ... -> EF 6.x DbContext Generator.
Upgrade from Entity Framework 5 to 6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With