views:

33

answers:

1

I have taken the POCO tt templates that can be used in Studio 2010 with Entity Framework and modified them to better fit my needs. I have added a few things to make testing easier.

Now I want to be able to right click on the entity framework design surface, choose "Add Code Generation Item" and select my templates instead of the built in POCO ones so that I can use them more easily.

Does anyone know of where I need to start to make this happen. I can't seem to find anything appropriate with Google, so sorry if this is a duplicate question. Any examples anyone can point me to?

A: 

You can replace the template files on the disk.

They are stored at:

%program files%\Microsoft Visual Studio 10.0\Common7\IDE\

under the directories ItemTemplates and ItemTemlatesCache (one is zip files and the other is what the IDE has open).

They have names that all start with "AdoNetEntityDataModelT4". You can replace the templates in the zip files (under ItemTemplates) and on disk (in ItemTemplatesCache). Search around and you'll be able to find the template you wish to change.

Will