Entity Framework Power Tools Beta 4

Free

Preview of useful design-time features for DbContext. When right-clicking on a C# project, the following context menu function is supported: 1) Reverse Engineer Code First - Generates POCO classes, derived DbContext and Code First mapping for an existing database. When righ...

(142) Review
Visual Studio
2013, 2012, 2010
Download (257,517)
10/11/2013
0.9.0.0
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (142)
Sign in to write a review
Sort by:

by Gustavo Mansilia | March 25 2013

I noticed that while generating the POCO classes, NuGet uptades the package of Entity Framework to version 6. I had some problems with MySql for this.

Simply removing the EF 6 and putting the EF 5, solves the problem.

My suggestion is to provide an interface to choose wich table we want to generate.

I'm liking this tool so far... hoping this to evolve more, to be more functional and stable.

by TrumanCode | March 23 2013

Rowan, I'm sure you guys are well aware of this but EF Power Tools Beta 3 in VS 2012 does not reverse engineer SQL Compact databases. Is this bug going to fixed in the next revision?

The error is:

System.ArgumentException:

The modelEntityContainerName parameter 'C:\XXXX\XXXXContext' contains characters that are not valid.
at XXXsdfConteSystem.Data.Entity.Design.EntityModelSchemaGenerator.Initialize(EntityContainer storeEntityContainer, IEnumerable`1 storeFunctions, String namespaceName, String modelEntityContainerName)
at System.Data.Entity.Design.EntityModelSchemaGenerator..ctor(EntityContainer storeEntityContainer, String namespaceName, String modelEntityContainerName)
at Microsoft.DbContextPackage.Handlers.ReverseEngineerCodeFirstHandler.ReverseEngineerCodeFirst(Project project)

by Charles Sterling | March 08 2013

test

by lazyberezovsky | February 28 2013

Reverse engineering works fine, but Data Model viewing fails with "Sequence contains no elements". My context is inherited directly from DbContext, and it has default constructor. VS2010, EF5.

by sunil dixit | February 16 2013

It's good but it lacks many features.

Once I have generated POCO files, and now I want to just generate for few specific tables, as I have already done some alterations in the existing poco classes. There is no option available.

by CharlesLZ | February 15 2013

Reverse engineering feature does not honor cascade delete settings for foreign keys.

If FK1 has Delete Rule set to No Action in SQL Server, the following mapping is generated.

this.HasRequired(t => t.Entity)
.WithMany(t => t.RelatedEntities)
.HasForeignKey(d => d.EntityId);

This implies delete on cascade which goes against what the database was originally designed to do. It should be generating the following...

this.HasRequired(t => t.Entity)
.WithMany(t => t.RelatedEntities)
.HasForeignKey(d => d.EntityId)
.WillCascadeOnDelete(false);

Otherwise, the tool has worked out great so far.

**UPDATE

I was able to resolve the issue above by customizing the t4 templates. You can determine if the FK is set to cascade via navProperty.ToEndMember.DeleteBehavior == System.Data.Metadata.Edm.OperationAction.Cascade

by Mario DeSousa | February 11 2013

Unfortunately, doesn't seem to be working on Visual Studio 2012. I tried using the "View Entity Data Model (Read-Only)" option (as well as other options in the same menu). It's giving me a "Sequence contains no matching element" error. This happens even for a very simple context with a simple entity.

Is there any place where I can get a stack trace or more details?

by Kevin Cefalu | February 08 2013

Got this error when attempting to update to the latest release. Any solutions?

02/07/13 16:31:28 - Install Error : VSIXInstaller.SignatureMismatchException: The signature on the update version of 'Entity Framework Power Tools Beta 2' does not match the signature on the installed version. Therefore, Extension Manager cannot install the update.
at VSIXInstaller.Common.VerifyMatchingExtensionSignatures(IInstalledExtension installedExtension, IInstallableExtension updateExtension)
at VSIXInstaller.InstallProgressPage.BeginInstallVSIX(SupportedVSSKU targetAppID)


by Donovan Brown | February 06 2013

I can't get it Reverse Engineer a SQL Compact database. The database I am trying to open is db.sdf.

System.ArgumentException: The modelEntityContainerName parameter 'D:\dbsdfContext' contains characters that are not valid.
at System.Data.Entity.Design.EntityModelSchemaGenerator.Initialize(EntityContainer storeEntityContainer, IEnumerable`1 storeFunctions, String namespaceName, String modelEntityContainerName)
at System.Data.Entity.Design.EntityModelSchemaGenerator..ctor(EntityContainer storeEntityContainer, String namespaceName, String modelEntityContainerName)
at Microsoft.DbContextPackage.Handlers.ReverseEngineerCodeFirstHandler.ReverseEngineerCodeFirst(Project project)

by Maxkn1 | February 05 2013

Generate Views does not work.
Tested on this simple case:

public class TestContext :DbContext
{
public TestContext() {}
public DbSet<TestModel> TM { get; set; }
}

public class TestModel
{
public long Id { get; set; }
public string Name { get; set; }
}

Every time got the "Sequence contains no matching element" error message


Microsoft Visual Studio Ultimate 2012
Version 11.0.51106.01 Update 1
Microsoft .NET Framework
Version 4.5.50709

by agilliam | February 01 2013

Unable to view entity data in any format from 'Entity Framework' submenu in Solution Explorer. Exception thrown in dialog box: "Exception has been thrown by the target of an invocation" when I attempt.

Reverse Engineering DB works, however. Great feature!

by xiaozhuang | February 01 2013

Does anyone know how to get column extend Properties in Entity.tt ? e.g. Column Description?

by k4gdw | January 31 2013

+1 for VB support. Can't really make use of this tool without it since we're a VB shop.

by horrorace | January 30 2013

This was working excellently for me but recently I have been getting the error below when doing a reverse engineer. I have been pulling my hair out trying to work out what's going wrong. The same solution works on my coworkers machines when doing the same thing so it must be something wrong on my Visual Studio.

One or more errors occurred while processing template 'Entity.tt'.
CodeTemplates\ReverseEngineerCodeFirst\Entity.tt(2,4) : error : There was an error loading the include file 'EF.Utility.CS.ttinclude'. The transformation will not be run. The following Exception was thrown:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.DbContextPackage.Utilities.EfTextTemplateHost.Microsoft.VisualStudio.TextTemplating.ITextTemplatingEngineHost.LoadIncludeText(String requestFileName, String& content, String& location)
at Microsoft.VisualStudio.TextTemplating.Engine.ProcessIncludeDirective(Directive directive, ITextTemplatingEngineHost host)

by Willberforce | January 30 2013

by .NotNet | January 28 2013

I'm having trouble reverse enginering a database named [133.0040] (without the brackets) resulting in:

System.ArgumentException: The modelEntityContainerName parameter '1330040Context' contains characters that are not valid.
at System.Data.Entity.Design.EntityModelSchemaGenerator.Initialize(EntityContainer storeEntityContainer, IEnumerable`1

storeFunctions, String namespaceName, String modelEntityContainerName)
at System.Data.Entity.Design.EntityModelSchemaGenerator..ctor(EntityContainer storeEntityContainer, String namespaceName,

String modelEntityContainerName)
at Microsoft.DbContextPackage.Handlers.ReverseEngineerCodeFirstHandler.ReverseEngineerCodeFirst(Project project)

Please advise (renaming the database is not an option).

by Sm1le291 | January 25 2013

Hello!
When I try to execute this action
*Right-click on the CodeFirstExistingDatabaseSample project in Solution Explorer
*Select Entity Framework -> Reverse Engineer Code First

from http://msdn.microsoft.com/en-us/data/jj200620 lesson
I see this message in Output window:
One or more errors occurred while processing template 'Entity.tt'.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude(1,4) : error : A processor named 'T4VSHost' could not be found for the directive named 'CleanupBehavior'. The transformation will not be run. The following Exception was thrown:
System.InvalidOperationException: Cannot find processor for directive 'T4VSHost'.
at Microsoft.DbContextPackage.Utilities.EfTextTemplateHost.Microsoft.VisualStudio.TextTemplating.ITextTemplatingEngineHost.ResolveDirectiveProcessor(String processorName)
at Microsoft.VisualStudio.TextTemplating.Engine.ProcessCustomDirectives(ITextTemplatingEngineHost host, TemplateProcessingSession session, IEnumerable`1 directivesToBeProcessed)

by Sid.S | January 22 2013

Good in theory, they need to fix their release process. It's been several weeks since the tools became inoperative with VS2012 and nobody has bothered releasing an update. How are you supposed to depend on the tools in a commercial environment with such response times? Luckily James Manning has a work-around (that works for us) but as a MSFT EF product, this should have been fixed on the order of hours, not weeks (and it's a simple fix too!).

by MVandersteen | January 19 2013

HI Guys, tried using against latest MySql.Entities available through NuGet but fails on the Mapping.tt file.

To resolve issue I produced the tt. CodeTemplates from the content menu (right click) then commented out the sections in the mapping.tt file for the FixedLength & MaxLength checking. For some reason on MySql these pieces of information are missing in the properties retrieved from when the database schema is read.
If these following properties could be populated then the tool would work fine for MySQL as well, as it is, i can at least generate all the entities as it is then just go through and apply the StringLength value (or MaxLength) to the relevant fields which is most string (varchar) fields :)

var fixedLengthFacet = (Facet)prop.TypeUsage.Facets.SingleOrDefault(f => f.Name == "FixedLength");
var maxLengthFacet = (Facet)prop.TypeUsage.Facets.SingleOrDefault(f => f.Name == "MaxLength");

by Brad Wood | January 18 2013

Another +1 for @James Manning's fix

61 - 80 of 142 Items