开发者

NHibernate.HibernateException: Unable to locate persister: ABC.Interfaces.Entities.IUser

开发者 https://www.devze.com 2023-04-05 10:07 出处:网络
I\'m getting this error: NHibernate.HibernateException: Unable to locate persister: ABC.Interfaces.Entities.IUser

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);


Look at this post. It seems that the problem may be in the mapping of IUser in NH

0

精彩评论

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

关注公众号