Pros and Cons of each Entity Template type ie POCO, Entity Objects etc.

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

Pros and Cons of each Entity Template type ie POCO, Entity Objects etc.

Post by EdB » Tue 12 Feb 2013 17:00

Hi All,

I am trying to figure out the merits of each of the Model Generation Templates. My current preference is POCO since it is simple. However I may be missing some benefits of the others. Also I am using buddy classes to hold Data Annotations for validation.

Many thanks,

Ed

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Re: Pros and Cons of each Entity Template type ie POCO, Entity Objects etc.

Post by Shalex » Wed 13 Feb 2013 15:49

DbContext template is designed for generating a strongly-typed DbContext class and persistence ignorant entity classes.

EntityObject template is designed for generating a strongly-typed ObjectContent class and persistence-aware classes.

POCO Entity template is designed for generating a strongly-typed ObjectContext class and classes with persistence ignorance.

Self-Tracking Entity template is designed for generating a strongly-typed ObjectContext class and self-tracking entity classes.

Repository and Unit of Work template is designed for generating Repositories and Unit of Work for Entity Framework model.

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

Re: Pros and Cons of each Entity Template type ie POCO, Entity Objects etc.

Post by EdB » Thu 14 Feb 2013 12:46

Hi,

Thanks for this.

Your wording I recollect is from the documentation. However it does not really help me understand which one I should use. For example is one more efficient or more performant, is one simpler, does one offer more features etc etc. As I say at the moment, due to simplicity, I have opted for POCO.

Thanks,

Ed

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Re: Pros and Cons of each Entity Template type ie POCO, Entity Objects etc.

Post by Shalex » Mon 18 Feb 2013 16:48

Tips for general differences between templates are mentioned at http://stackoverflow.com/questions/5340 ... ectcontext. Be aware that Devart's templates include more features (which are not properly documented at the moment) comparing to the standard templates. The design time interface of Entity Developer allows to get acquainted with the template's functionality, also the embedded T4 Editor makes it possible to adjust template for your needs.
The description of the Entity Developer EF DbContext template is available at http://blogs.devart.com/dotconnect/enti ... plate.html.

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

Re: Pros and Cons of each Entity Template type ie POCO, Entity Objects etc.

Post by EdB » Mon 18 Feb 2013 17:19

Hi,

Thanks for this.

I think a DevArt blog on the pros and cons of each type would be very worthwhile then. Any chance? Especially as Devart ED adds functionality.

It seems that my current POCO choice is correct and pragmatic, subject to future enlightenment !!!

Thanks.

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Re: Pros and Cons of each Entity Template type ie POCO, Entity Objects etc.

Post by Shalex » Tue 19 Feb 2013 16:18

I think a DevArt blog on the pros and cons of each type would be very worthwhile then. Any chance? Especially as Devart ED adds functionality.
Thank you for your suggestion. We will consider the possibility of creating the corresponding blog article.

Post Reply