Thanks, have just joined the group. On Fri, Mar 6, 2009 at 9:25 AM, Tuna Toksoz <[email protected]> wrote: > Please use > > [email protected] > > Thanks. > > Tuna Toksöz > http://tunatoksoz.com > http://turkiyealt.net > http://twitter.com/tehlike > > Typos included to enhance the readers attention! > > > > On Fri, Mar 6, 2009 at 12:24 AM, Craig van Nieuwkerk <[email protected]> > wrote: >> >> I am trying to configure fluent nHibernate and have this code >> >> Assembly mappingAssembly = >> Assembly.ReflectionOnlyLoadFrom("LibrarySample.Model.dll"); >> >> sessionFactory = Fluently.Configure() >> .Database(MsSqlConfiguration.MsSql2005 >> .ConnectionString(c => c >> .FromAppSetting("ConnectionString")) >> .ShowSql()) >> .Mappings(m => m >> .FluentMappings.AddFromAssembly(mappingAssembly)) >> .BuildSessionFactory(); >> >> When I run I get this message though >> "FluentNHibernate.Cfg.FluentConfigurationException: An invalid or >> incomplete configuration was used while creating a SessionFactory". >> >> If I use this code it works, but I don't want to reference the Model >> assembly directly from the Core assembly that has the nHibernate >> session manager. >> >> Assembly mappingAssembly = >> Assembly.ReflectionOnlyLoadFrom("LibrarySample.Model.dll"); >> >> sessionFactory = Fluently.Configure() >> .Database(MsSqlConfiguration.MsSql2005 >> .ConnectionString(c => c >> .FromAppSetting("ConnectionString")) >> .ShowSql()) >> .Mappings(m => m >> >> .FluentMappings.AddFromAssemblyOf<LibrarySample.Model.Book>()) >> .BuildSessionFactory(); >> >> Can someone help? >> >> > > > > >
hank --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
