This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
How to make NHibernate Designer to auto generator xml files instead of using system.xml.linq? I want to use it in .net framework 2.0. |
|
|
We don't currently offer this option. We will be opening up the code generation strategy a bit in version 2, so we may be able to add 'loose XML files' in a post-2.0 release, but that won't be for a few weeks yet. Sorry. One thing you might be able to do is tweak the templates to expose the generated XML as a string instead of an XDocument (look in Entity.vm). You would also need to tweak the ConfigurationHelper template (in Base.vm) to work with strings instead of XDocuments, and to change or remove the generated customisation partial method (again in Entity.vm). This shouldn't be too difficult to do -- http://www.mindscapehq.com/blog/index.php/2009/09/16/customising-lightspeed-entity-templates/ discusses how to do (it's written in the context of the LightSpeed ORM but the NHibernate Designer is very similar). Note you will need the latest update to the designer (build 18280) to get per-project templates. |
|