开发者

MembershipUser business object

开发者 https://www.devze.com 2023-03-10 03:56 出处:网络
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,

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

精彩评论

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