You can go on starting from here:

var mapping = mapper.CompileMappingForAllExplicitAddedEntities(), "Domain");
var xmlMapping = mapping.AsString(); // It's an extension method defined in
NHibernate.Mapping.ByCode.MappingsExtensions

Then you can transform xmlMapping into whatever you need, e.g.: clipboard,
file, etc., even while you're debugging :D.




-- 
Regards,

Maximilian Haru Raditya






On Fri, Jun 10, 2011 at 1:17 PM, Richard Wilde <[email protected]>wrote:

> Hi I am playing with NH 3.2 and mapping by code. I have got it up and
> running and all works great (in fact I quite like this syntax),
> however I am trying to work out how I export the hbm generated
> mappings into files so I can see what has been put together. In Fluent
> Nhibernate I could call ExportTo...
>
> var mapper = new ModelMapper();
> mapper.AddMappings(typeof(ActorMapping).Assembly.GetTypes());
>
> var configure = new Configuration();
> configure.DataBaseIntegration(x =>
>      {
>           x.Dialect<MsSql2008Dialect>();
>           x.ConnectionStringName = "db";
>       });
>
>
> configure.AddDeserializedMapping(mapper.CompileMappingForAllExplicitAddedEntities(),
> "Domain");
>
> Can anyone point me in the right direction
> Many thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to