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:

image_thumb2

I was then asked if I wanted to synchronize my model with a database later on, which seems like a good idea:

image_thumb7

Next, I am asked about the target server, interesting, all databases for which I have an ADO.NET provider installed are present:

image_thumb10

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:

image_thumb13

Next, some namespace and Entity Framework version options:

image_thumb16

I chose Entity Framework 6 and then I got to chose the template:

image_thumb19

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:

image_thumb22

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:

image_thumb25

While generating the model, we can add spatial types as properties (if the target database server supports them), which is nice:

image_thumb31

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:

image_thumb34

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.

                             

No Comments

Add a Comment

As it will appear on the website

Not displayed

Your website