locked
how to change T4 code genration stratagy to model.designer.cs in entity framework RRS feed

  • Question

  • User1575078971 posted

    I had started learning entity framework using vs 2017 community edition when i usually learn by video tutorial because its easy to track.. Well when i finish configuration entity model it generate model.tt I tried to figure out why its happen and non of the strategy work. 

    can you please answer me how to disable t4 template and use the old one.?

    or, and

    and how can i learn t4 template from scratch?

    thank you for giving your valuable time for my query

    Monday, May 29, 2017 12:05 PM

Answers

  • User-1838255255 posted

    Hi harshamrita, 

    According to your description, T4 stands for Text template transformation toolkit, it is template-based code generation engine built in VS. Selected template will generate the C# or VB code files. For more details, please refer to this tutorial:

    Using T4 templates in Entity framework:

    http://www.dotnettricks.com/learn/entityframework/using-t4-templates-in-entity-framework 

    can you please answer me how to disable t4 template and use the old one.?

    Create Entity Framework Without t4 code generator (like vs 2010):

    https://stackoverflow.com/questions/35987219/create-entity-framework-without-t4-code-generator-like-vs-2010 

    Best regards,

    Eric Du

    Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 1, 2017 5:24 AM

All replies

  • User-1838255255 posted

    Hi harshamrita, 

    According to your description, T4 stands for Text template transformation toolkit, it is template-based code generation engine built in VS. Selected template will generate the C# or VB code files. For more details, please refer to this tutorial:

    Using T4 templates in Entity framework:

    http://www.dotnettricks.com/learn/entityframework/using-t4-templates-in-entity-framework 

    can you please answer me how to disable t4 template and use the old one.?

    Create Entity Framework Without t4 code generator (like vs 2010):

    https://stackoverflow.com/questions/35987219/create-entity-framework-without-t4-code-generator-like-vs-2010 

    Best regards,

    Eric Du

    Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 1, 2017 5:24 AM
  • User1575078971 posted

    Thanks for your reply and giving me your valuable time

    Thursday, June 1, 2017 3:56 PM