开发者

Custom Tuplizer in Fluent Nhibernate

We're trying to pull off this spectaular hack, and have got as far as

foreach (var persistentClass in configuration.ClassMappings)
{
    persistentClass.AddTuplizer(EntityMode.Poco, typeof(Nul开发者_高级运维lableTuplizer).AssemblyQualifiedName);
}

but have no idea where this loop should go given we're using fluent NHibernate. Any suggestions?


Fluently.Configure()
    .Database(...)
    .Mappings(...)
    .ExposeConfiguration(config =>
    {
        foreach (var persistentClass in config.ClassMappings)
        {
            persistentClass.AddTuplizer(EntityMode.Poco, typeof(NullableTuplizer).AssemblyQualifiedName);
        }
    })
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜