Entity Developer Review, Part 3
Here is part 3 of my exploring Entity Developer series, this time, on Entity Framework. Read the first part here and the second here.
So, this time I decided to use Entity Developer to generate a database from an Entity Framework Code First model:
I was then asked if I wanted to synchronize my model with a database later on, which seems like a good idea:
Next, I am asked about the target server, interesting, all databases for which I have an ADO.NET provider installed are present:
A naming configuration screen for classes and properties is shown, similar to its NHibernate counterpart, with the curious exception of the option to remove invalid characters:
Next, some namespace and Entity Framework version options:
I chose Entity Framework 6 and then I got to chose the template:
Again, a number of templates exist, for both POCO, self-tracking (Entity Framework 4) entities, repository pattern, MVC, WCF RIA Services, etc, for C# as well as Visual Basic:
Because I started with model first (or code first), I am presented with an empty diagram. Weird, I got a validation message about not being able to find the Entity Framework 6 assembly, but it didn’t seem to affect the entities’ generation:
While generating the model, we can add spatial types as properties (if the target database server supports them), which is nice:
Everything seemed to work, from generating the database from the model, to the actual classes. We get to tune some of the DbContext options such as LazyLoadingEnabled through the model settings:
It is also possible to specify stored procedures for the DELETE, INSERT and UPDATE operations, but only if one stored procedure exists in the model.
So, to add it up, everything worked as expected, the functionality is similar to that when using an NHibernate model.
Coming next, advanced usages of Entity Developer.