I am working on a dynamic application with NHibernate. My goal is to create dynamic objects (both class type and xml mapping file) based on some data. For example, suppose I want to create a Person object dynamically at runtime and on the fly.
I am using Reflection.Emit to dynamically create a class type. To dynamically create the display, I used Ayende code. . But, unfortunately, this code does not work, because mappings does not have the Classes property. I tried to code the same as Castle ActiveRecord and Fluent NHibernate codes, but they generate HBM XML files. Since I do not want to create / create mapping files, therefore I cannot use these solutions.
Is there a way that, like Ayende's solution, should not be forced to generate HBM XML mapping files and just do everything dynamically and in memory?
source share