English 中文(简体)
MembershipUser业务对象
原标题:MembershipUser business object

我有一个单独的项目,其中包含我所有的业务对象。其中一个业务对象User保存登录信息,我希望将其转换为MembershipUser此处)。但是,MembershipUser对象需要System.Web。我不想将该引用添加到我的BO项目中。如果没有BO项目中的依赖项,我如何将我的业务对象用作MembershipUser?

最佳回答

你真的不能,至少不能直接。我能想到的唯一方法是在你的web项目中编写一个包装类,它继承自MembershipUser,并将你的一个BO作为构造函数参数,然后将其所有功能委托给BO。这并不漂亮,但这几乎是我所知道的解决你的问题的唯一方法。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!