How to generate the entities?

Feb 23, 2011 at 8:37 AM

Hi,

I just downloaded the Expense app in an effort to learn more and consolidate my knowledge.

I've been doing ASP.NET for years, but since I'm just an employee I am tied to the business constraint: .NET 2.0...

Anyway, I started looking at tutorials, documentation and videos about all sorts of technologies that I don't know, WCF, WF, WPF, EF etc... and using your architecture as model.

At the moment I'm learning EF, and I'm trying to understand how you generated the entity classes. Did you generate them (using some sort of template (POCO))? Or did you write them from scratch?

The reason I'm asking is because during my learning I realised that when creating an EF model, the entities and dataaccess are closely tied together in the generated file. Then I saw it was possible to customise the generated classes by creating a code generation item (someName.tt) and then modifying the template. But no where in your code do I find any .tt file, what method did you use?

Thanks!

Seb :)

Coordinator
Feb 24, 2011 at 11:14 AM

Hi Seb,

At the time of writing, I hand-coded the entities myself. 

However, you can use the ADO.NET EF POCO Template in VS2010 to generate your entities.

Best Regards,

Serena