WIKI使用導(dǎo)航
站長(zhǎng)百科導(dǎo)航
站長(zhǎng)專題
- 網(wǎng)站推廣
- 網(wǎng)站程序
- 網(wǎng)站賺錢
- 虛擬主機(jī)
- cPanel
- 網(wǎng)址導(dǎo)航專題
- 云計(jì)算
- 微博營(yíng)銷
- 虛擬主機(jī)管理系統(tǒng)
- 開放平臺(tái)
- WIKI程序與應(yīng)用
- 美國(guó)十大主機(jī)
AspMVC映身對(duì)像
來自站長(zhǎng)百科
導(dǎo)航: 上一頁(yè)
在AspMvc中,對(duì)對(duì)像映射的代碼,我們關(guān)沒有單獨(dú)存放一個(gè)文件.我們使用Cache,在第一次訪問生成,存在Cache中,等下次使用時(shí),程序再訪問Cache,以提高效率.下面我們就介紹一個(gè)每個(gè)對(duì)像所具有的屬性與方法
例:對(duì)像User 屬性 username,password
對(duì)應(yīng)這個(gè)像對(duì)所具有的屬性與方法為:
User.Attrs
'該對(duì)像屬性集合
User.AttrCount
'該對(duì)像屬性個(gè)數(shù)
'屬性u(píng)sername的Get與Set
User.Getusername
User.Setusername
'屬性Password的Get與Set
User.Getpassword
User.Setpassword
'根據(jù)ID設(shè)置值
User.SetValueById
'根據(jù)ID取值
User.GetValueById
'根據(jù)屬性名設(shè)置值
User.SetValueByName
'根據(jù)屬性名取值
User.GetValueByName
'根據(jù)ID獲得屬性名稱
User.GetNameById