none
EF Change generated namespace RRS feed

  • Question

  • Hi all,

    I'm generating my POCO classes using the EF4 template. All works fine, however I move my .tt into a sub-folder. After I did this, the namespace changed to include the subfolder too. I don't want this.

    How can I change it?

    Thanks,

    Ivan

    Thursday, May 10, 2012 6:15 AM

Answers

  • Hi Cryo5,

    You can do this by setting the value of the “Custom Tool Namespace” property in the property browser of the template item.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Cryo75 Sunday, May 13, 2012 1:32 PM
    Sunday, May 13, 2012 1:24 PM
    Moderator

All replies

  • Hi Cryo75,

    Do you mean, you create a folder in the project and move .tt files into the folder? Could you please clarify which namespace include the folder's name?

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Friday, May 11, 2012 3:08 AM
    Moderator
  • Yes that's what I'm doing. When the classes are generated again they include the the folder's name in the namespace, eg. myproject.myfolder.

    Friday, May 11, 2012 6:17 AM
  • Hi Cryo5,

    You can do this by setting the value of the “Custom Tool Namespace” property in the property browser of the template item.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Cryo75 Sunday, May 13, 2012 1:32 PM
    Sunday, May 13, 2012 1:24 PM
    Moderator