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

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
EdB
Posts: 91
Joined: Mon 15 Oct 2012 09:24

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

Post by EdB » Mon 04 Aug 2014 10:10

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

EdB
Posts: 91
Joined: Mon 15 Oct 2012 09:24

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

Post by EdB » Mon 04 Aug 2014 14:05

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


MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

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

Post by MariiaI » Tue 05 Aug 2014 09:43

Glad to see that the issue was resolved. If you have any further questions regarding working with Entity Developer, feel free to contact us.

Post Reply