How can I invoke following method while I have not TRootEntity
, but have just its TYPE
:
public void Class<TRootEntity>(Action<IClassMapper<TRootEntity>> customizeAction) where TRootEntity : class;
final goal is to run following code
var mapper = new ModelMapper();
mapper.Class<MyClass>(ca =>
{
ca.Id(x => x.Id, map =>
{
map.Column("MyClassId");
map.Generator(Generators.HighLow, gmap => gmap.Params(new { max_low = 100 }));
});
ca.Property(x => x.Something, map => map.Length(150));
});
It is used to create dynamic NHibernate HBM
. More info available here