I need to access TableName of mapped class in AfterMapClass to be able to
setup generator properly - is there any solution how to obtain HbmClass
instance or any other object with TableName accessible? My code looks like
this:
modelMapper.AfterMapClass += (mi, t, map) =>
{
map.Id(x =>
{
var tableName = ???;
x.Column("ID");
x.Generator(Generators.HighLow, gm => gm.Params(new { where =
String.Format("TABLENAME = '{0}'", tableName) }));
});
}
I wasn't able to find any other method how to get this information other
than using reflection - I hope I just missed something obvious...
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/1Du8JdoMqFgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.