Ms-Velocity 与 Fluent NHibernate
我在我的项目中使用流畅的nHibernate,现在我想将ms速度与流畅的nHibernate一起应用,有人使用流畅的nHibernate速度吗?如果是,那么如何开始使用这个东西?
我有谷歌关于这个但没有找到任何好东西..
有人有配置示例吗?
更新: 对于 Fluent 配置,我做了:
Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008
.ConnectionString(c => c.FromConnectionStringWithKey("FNHConnection"))
)
.Cache(c=> c.UseQueryCache().ProviderClass((typeof(NHibernate.Caches.Velocity.VelocityProvider).AssemblyQualifiedName)))
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<User>()).BuildConfiguration()
.BuildSessionFactory();
但出现此异常:
无法从程序集“ClientLibrary,Version=1.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91”加载类型“System.Data.Caching.CacheFactory”。
我做错了什么?
谢谢
i m using fluent nHibernate in my project, now i want to apply ms velocity with fluent nHibernate, has anyone used velocity with fluent nHibernate ? if yes so how to get started with this thing ?
i have Google about this but didn't found any good stuff..
anyone have sample of configuration ?
Update:
for Fluent configuration i did:
Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008
.ConnectionString(c => c.FromConnectionStringWithKey("FNHConnection"))
)
.Cache(c=> c.UseQueryCache().ProviderClass((typeof(NHibernate.Caches.Velocity.VelocityProvider).AssemblyQualifiedName)))
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<User>()).BuildConfiguration()
.BuildSessionFactory();
but getting this exception:
Could not load type 'System.Data.Caching.CacheFactory' from assembly 'ClientLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'.
What i m doing wrong ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Velocity/AppFabric 的 NHibernate 缓存提供程序仅适用于 AppFabric 的测试版 - 它实际上已被破坏,因为用于联系 AppFabric 缓存的客户端程序集在 AppFabric 的发布版本中发生了更改。 Velocity 提供程序尚未更新为使用新程序集。
不过,此问题中详细介绍了一种解决方法引导您更新 AppFabric 的提供程序。
The NHibernate cache provider for Velocity/AppFabric will only work with the betas of AppFabric - it is, effectively, broken as the client assemblies used to contact an AppFabric cache were changed in the release version of AppFabric. The Velocity provider has not yet been updated to use the new assemblies.
However there is a workaround detailed in this question that walks you through updating the provider for AppFabric.