Anyone using ASP.NET MembershipProvider with Nhibernate?

天大地大妈咪最大 提交于 2019-12-25 03:14:31

问题


I'm trying to implement Membership controls in a mvc 2 application and i'm having trouble dealing with the MembershipUser class.

I have my own data store (in Postgresql) and I'm using Nhibernate to deal with it from C#. The thing is, I have my own user class, but I can't use it with any provider I found that implements Membership, because all the functions return the predefined MembershipUser class and cannot return my own.

I'm losing my mind here, is there any way i can work with this, or should I implement everything myself?

thanks in advance!


回答1:


You might want to look at NHibernate Membership Provider project and use it as a base to build from.




回答2:


You must derive from the MembershipUser class and override the methods you wish to replace.



来源:https://stackoverflow.com/questions/2864404/anyone-using-asp-net-membershipprovider-with-nhibernate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!