从流畅的Nhibernate生成XML映射 [英] Generate XML mappings from fluent Nhibernate
问题描述
如何在MappingIntegrationTests中生成xml映射文件
我需要手工检查流利映射是否与leagcy项目中的映射关联。
您可以执行以下操作:
config.Mappings(m =>
{
m.FluentMappings.ExportTo(... file path here ...);
m.HbmMappings.ExportTo (... file path here ...);
m.AutoMappings.ExportTo(... file path here ...);
{
);
我自己不喜欢它。如果我找到一些更好的方法(如果存在的话),我会更新答案。
请参阅
http://blog.jagregory.com/2009/02/03/fluent- nhibernate-configurations-your-application /
或者如果发生故障,请看这个代码
https://github.com/jagregory/fluent-nhibernate/wiki/Database-configuration
How do I generate xml mappings files as part of my tests in MappingIntegrationTests
I need to manually check if the fluent mappings correlate to the mappings in the leagcy project.
You can do something like:
config.Mappings(m =>
{
m.FluentMappings.ExportTo("...file path here...");
m.HbmMappings.ExportTo("...file path here...");
m.AutoMappings.ExportTo("...file path here...");
{
);
I don't like it myself. If I find some better way (if such exists at all) I'll update the answer.
See
http://blog.jagregory.com/2009/02/03/fluent-nhibernate-configuring-your-application/
Or if broken, see this instead
https://github.com/jagregory/fluent-nhibernate/wiki/Database-configuration
这篇关于从流畅的Nhibernate生成XML映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!