Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Custom Tool for Entity Framework, what does it do?

In Visual Studio, when working with Entity Framework and applying Run Custom Tool for .tt and .Context.tt files, What is it and what does it do?

Why it's solving database sync-problems (Sometimes)? and why i should run it for (.tt) before run it for (.Context.tt)?

like image 948
Alaa Avatar asked Dec 29 '13 08:12

Alaa


1 Answers

It's called 'Text Template Transformation Toolkit' and you can use it to create classes out of a meta description (for example). EF uses it to create the classes (context and entity classes) out of the model.

You can also look at http://en.wikipedia.org/wiki/Text_Template_Transformation_Toolkit

You can create your own template and have them run. We used it to create an enumeration of of a database table once. More convienient than to do that manually. Later this was deprecated because EF has gained support for enumerations.

like image 116
Sascha Avatar answered Oct 16 '22 11:10

Sascha