[已解决问题] petshop4的若干问题!!
提问时间: 2008-07-24 22:35
悬赏分:5 浏览:188 次

petshop4 重写了 profile 

 public sealed class PetShopProfileProvider : ProfileProvider

{//实现

}

然后在web.config 这样

<profile automaticSaveEnabled="false" defaultProvider="ShoppingCartProvider">
   <providers>
    <add name="ShoppingCartProvider" connectionStringName="SQLProfileConnString" type="PetShop.Profile.PetShopProfileProvider" applicationName=".NET Pet Shop 4.0"/>
    <add name="WishListProvider" connectionStringName="SQLProfileConnString" type="PetShop.Profile.PetShopProfileProvider" applicationName=".NET Pet Shop 4.0"/>
    <add name="AccountInfoProvider" connectionStringName="SQLProfileConnString" type="PetShop.Profile.PetShopProfileProvider" applicationName=".NET Pet Shop 4.0"/>
   </providers>
   <properties>
    <add name="ShoppingCart" type="PetShop.BLL.Cart" allowAnonymous="true" provider="ShoppingCartProvider"/>
    <add name="WishList" type="PetShop.BLL.Cart" allowAnonymous="true" provider="WishListProvider"/>
    <add name="AccountInfo" type="PetShop.Model.AddressInfo" allowAnonymous="false" provider="AccountInfoProvider"/>
   </properties>
  </profile>

PetShop.BLL.Cart

PetShop.Model.AddressInfo

在调用的时候这样

请问 Profile.WishList.CartItems


     Profile.WishList.Remove(e.CommandArgument.ToString());
     break;
    case "Move":
     Profile.WishList.Remove(e.CommandArgument.ToString());
                    Profile.ShoppingCart.Add(e.CommandArgument.ToString());
     break;
   }
   Profile.Save();

请问 Profile.WishList.Remove   这些调用的是PetShop.BLL.Cart 的方法 还是调用的

public sealed class PetShopProfileProvider : ProfileProvider

{//实现

} 这个地方定义的方法  谢谢  我困惑啊

提问者:barney - 初学一级

问题补充:public sealed class PetShopProfileProvider : ProfileProvider

{//实现

}

这个类起得作用是什么 我感觉没什么用处!!!
我知道重写基类 但是没感觉到用在了哪里!!

所有回答(1)
参考这篇文章,楼主可以先学学.net 的profile新特性. PetShop 4.0 详解之七(PetShop表示层设计) http://www.cnblogs.com/YoungPeng/archive/2008/04/30/1177629.html Hope it help!!
1个月前   回答者:Sink - 菜鸟二级
评论
   您需要登录以后才能回答!
 

我要提问

我的问题


快到期问题

> 问题排行榜

相关链接