SharpArchitecture: Using FNH's ClassMaps instead of auto mapping
Posted
by zihotki
on Stack Overflow
See other posts from Stack Overflow
or by zihotki
Published on 2010-04-04T05:06:35Z
Indexed on
2010/04/04
5:13 UTC
Read the original article
Hit count: 547
I need to use ClassMaps instead of auto mapping because of legacy database. But I don't see how to tune SharpArch to use them. I tried to remove AutoPersistentModelGenerator and use the following code in the InitializeNHibernateSession method:
var config = NHibernateSession.Init(webSessionStorage,
new[]{"ApplicationConfiguration.Models.dll"});
Fluently.Configure(config)
.Mappings(m =>
{
m.FluentMappings.AddFromAssemblyOf<ConfigSchema>();
});
But I always get MappingException - "No persister for: ConfigSchema" when trying to work with the ConfigSchema.
Has anyone tried to do this?
© Stack Overflow or respective owner