Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
So far I used this code to configure a session factory:

Configuration configuration = new Configuration();
configuration.Configure();
SessionFactory = configuration.BuildSessionFactory();


Now I added some fluentNhibernate mapping classes, and used this code to configure:

Configuration configuration = new Configuration();
configuration.Configure();
SessionFactory = configuration.BuildSessionFactory();


SessionFactory = Fluently.Configure(configuration).Mappings(m =>
{
    m.FluentMappings.AddFromAssemblyOf<AttachmentLocaionMap>();
    m.FluentMappings.AddFromAssemblyOf<AttachmentTypeMap>();
    m.FluentMappings.AddFromAssemblyOf<AttachmentMap>();
 }).BuildSessionFactory();


But I guess it overrided the old xml mapping?
Now I want to **add** then to the **already existing** exmbeded resources xml-based mapping

How do I do this?

i saw this http://devlicio.us/blogs/derik_whittaker/archive/2009/01/28/using-fluent-nhibernate-and-traditional-hbm-xml-files-in-the-same-project.aspx, but i don't want to add

C#
configuration.AddXmlFile( "Mappings/Insurance.hbm.xml" );

or
C#
configuration.AddAssembly(...);


for each existing xml (as up till now I dodn't do it for each ebmbeded resource xml)
Posted
Updated 25-Nov-11 23:41pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900