NHibernate.HibernateException:无法找到持久器:ABC.Interfaces.Entities.IUser
我收到此错误:
NHibernate.HibernateException:无法定位持久器:ABC.Interfaces.Entities.IUser
这是否意味着由于某种原因未找到映射文件(我正在使用流畅)?
在我的 nhibernate.data 项目中,我有以下定义:
public class UserMap : ClassMap<IUser>
{
public UserMap()
{
Id(x => x.Id);
Map(x => x.Username);
Map(x => x.Password);
Map(x => x.Firstname);
Map(x => x.Lastname);
Map(x => x.CreatedDate);
Map(x => x.UpdatedDate);
}
}
问题是什么?
或者这与温莎城堡没有实施有关吗?
我有:
container.Register(Component.For<IUser>().ImplementedBy<User>().LifeStyle.Transient);
I'm getting this error:
NHibernate.HibernateException: Unable to locate persister: ABC.Interfaces.Entities.IUser
Does this mean the mapping file (I'm using fluent) isn't being found for some reason?
In my nhibernate.data project I have the below definition:
public class UserMap : ClassMap<IUser>
{
public UserMap()
{
Id(x => x.Id);
Map(x => x.Username);
Map(x => x.Password);
Map(x => x.Firstname);
Map(x => x.Lastname);
Map(x => x.CreatedDate);
Map(x => x.UpdatedDate);
}
}
What is the problem?
Or does it have to do with castle windsor not picking up the implementation?
I have:
container.Register(Component.For<IUser>().ImplementedBy<User>().LifeStyle.Transient);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅这篇文章。看来问题可能出在NH中IUser的映射上
Look at this post. It seems that the problem may be in the mapping of IUser in NH