开发者

Entity Frameworks 4 - Changing the model does not update the T4 self tracking template files

I am using self tracking entities and have moved the entity classes to another assembly by using 'Add as link' to point to the TT file as mentioned here. N开发者_JAVA百科ow though, when I update the model (for instance change a property name) the template is not automatically run and so the entity class does not get updated.

I can of course manually run the template to get the updates, but it would be easier if it ran automatically in the way it did before I moved the classes. Is there any way to achieve this?

Darren.


I've not done this but I suspect the following is possible. Mark the model with a custom tool (see under properties of the file in solution explorer). Then create a small program (see here for an example) that will execute a the TT's run custom tool.


I have not run into this issue. Usually when i save the model or build the project which contains my edmx file, the code files for my entities are updated. can you share your project with me through direct email. I wouldn't mind trouble shooting the problem and then following up with team if we cant get it to work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜