开发者

MembershipUser business object

I have a separate project that contains all of my business objects. One of the business objects, User, holds login information and I want to convert it to be a MembershipUser object (see here). However, MembershipUser object requires System.Web. I don't want to add that reference to my BO project. How do I use my business object as a Mem开发者_运维问答bershipUser without the dependency living in my BO project?


You really can't, at least not directly. The only way I can think of is to write a wrapper class in your web project which inherits from MembershipUser and takes in one of your BOs as a constructor param, then delegates all its functionality to the BO. It's not pretty, but it's pretty much the only way I'm aware of to solve your problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜