You may be able to get Fluent NHibernate to help you out here, along
with the hbm2ddl tools.  The following code will produce some DDL for
you:

var apm = AutoPersistenceModel.MapEntitiesFromAssemblyOf<NStud>();
var cfg = new Configuration().AddAutoMappings(apm);
var exporter = new SchemaExport(cfg);
exporter.Execute(true, false, false, true);

More details at 
http://nhforge.org/wikis/howtonh/customizing-fluent-nhibernate-s-autopersistencemodel-conventions.aspx
and 
http://blog.vuscode.com/malovicn/archive/2009/01/03/fluent-nhibernate-nhibernate-without-configuration-files-automap-magic.aspx.

If you want the XML mappings then there is a way of extracting them
from the AutoPersistenceModel object, but I can't recall how to that
off the top of my head.

Cheers,
John

On Jan 20, 10:35 am, Dan B <[email protected]> wrote:
> Please send me the codes is very urgent.
-- 
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