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

Viewed 12733

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)?

2 Answers

Text Template Transformation Toolkit (usually referred to as "T4") is used by developers as part of an application or tool framework to automate the creation of text files with a variety of parameters. These text files can ultimately be any text format, such as code (for example C# and specially generate ADO & Assembly files). When we update our model from database, T4 generate those required files but Sometimes it doesn't. It could be because of VS version or Our mistakes. So now we need to generate ADO, Assembly and other required dependent classes and files to run the project error free.

So run custom tool option on .tt & .context.tt gives us option to Generate those files.

Related