nhibernatenhibernate-mappingnhibernate-mapping-by-code

NHibernate Mapping-by-Code


How to add a additional field in the database schema(SQL) from NHibernate mapping exported that not exist on entity?

I have:

Property(x => x.Name, "Name");
Property(x => x.Description, "Product");

and I want add to exported schema(SQL):

Property("Department"); (this property not exist in the entity)

Solution

  • You should be able to use an AuxilliaryDatabaseObject.