Page 1 of 1

Why does ED, with EF6 selected as the target, not generating correct EF6 "using" statements?

Posted: Mon 04 Aug 2014 10:10
by EdB
Hi,

Entity Framework 6 has pulled out quite a bit of code from the .NET runtimes into its own EntityFramework.dll due to it being open source now. As a result one has to make changes to the "using" statements where EF is used. This includes the code that ED generates. Therefore, with ED 5.7.412, when selecting EF6 as the export target, I am wondering why ED generates code with incorrect "using" statements, ie the old EF5 format rather than the new EF6 format.

I get:

using System.Data.Common;
using System.Data.EntityClient;
using System.Data.Objects;
using System.Data.Objects.DataClasses;

However I should get:

using System.Data.Entity.Core.Common;
using System.Data.Entity.Core.EntityClient;
using System.Data.Entity.Core.Objects;
using System.Data.Entity.Core.Objects.DataClasses;

I am using the POCO template.

Thanks,

Edward

Re: Why does ED, with EF6 selected as the target, not generating correct EF6 "using" statements?

Posted: Mon 04 Aug 2014 14:05
by EdB
I think this has resolved itself, as I had incorrect EF6 references in my model project, although Nuget seem to think that EF6 was installed. I needed to ensure that EntityFramework.dll and EntityFramework.SqlServer.dll is referenced.

Edward

Re: Why does ED, with EF6 selected as the target, not generating correct EF6 "using" statements?

Posted: Tue 05 Aug 2014 09:24
by EdB
Resolved....

Re: Why does ED, with EF6 selected as the target, not generating correct EF6 "using" statements?

Posted: Tue 05 Aug 2014 09:43
by MariiaI
Glad to see that the issue was resolved. If you have any further questions regarding working with Entity Developer, feel free to contact us.