EF POCO T4 Template: Changing namespaces and folders RRS feed

  • Question

  • HI,

     So I'm using the T4 template to generate my POCO classes from my EF model.  I would like to further separate the generated entities by folder and namespace. Therefore, certain classes would go into the \Security folder and would have "Security" in the namespace. Likewise, Frames would go into the \Frames folder and ... you get the picture. 

    So far, what I have thought of is to have a different edmx model for each namespace that included only the entities for that namespace. Then, I would have a different template for each as well which I would modify to take into account the target folder and namespace.  

    As for the ObjectContext class, I would create one that would contain all the entities generated. 

    Does this seem like an acceptable approach? Is there a better way? 

    Friday, July 27, 2012 2:12 PM