FluentNhibernate dynamic runtime mappings.

Posted by Paul Knopf on Stack Overflow See other posts from Stack Overflow or by Paul Knopf
Published on 2010-04-10T18:00:56Z Indexed on 2010/04/10 18:03 UTC
Read the original article Hit count: 247

I am building a framework where people will be able to save items that the created by inheriting a class of mine. I will be iterating over every type in the appdomain to find classes that I want to map to nhibernate. Every class that I find will be a subclass of the inherited type.

I know how to create sub types in FluentNhibernate, but every sub type requires its own ClassMap class. Since I won't know these untill runtime, there is no way I can do that.

Is there a way that I can add mappings to fluent nhibernate?

Note, I know this is possible without fluent nhibernate using the Cfg class, but I don't want to manage the same code two different ways.

© Stack Overflow or respective owner

Related posts about fluent-nhibernate

Related posts about nhibernate