AspMVC映身对像:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
 
第9行: 第9行:
对应这个像对所具有的属性与方法为:
对应这个像对所具有的属性与方法为:


*User.Attrs
User.Attrs
'该对像属性集合


*User.AttrCount
'该对像属性集合
'该对像属性个数


User.AttrCount


*'属性username的Get与Set
'该对像属性个数
User.Getusername


User.Setusername


'属性username的Get与Set


*'属性Password的Get与Set
User.Getusername
User.Getpassword


User.Setpassword
User.Setusername


*'根据ID设置值
User.SetValueById


*'根据[[ID]]取值
'属性Password的Get与Set
User.GetValueById
 
User.Getpassword
 
User.Setpassword
 
'根据ID设置值
 
User.SetValueById
 
'根据[[ID]]取值
 
User.GetValueById
   
   
*'根据属性名设置值
'根据属性名设置值
User.SetValueByName
 
User.SetValueByName
 
'根据[[属性]]名取值
 
User.GetValueByName


*'根据[[属性]]名取值
'根据[[ID]]获得属性名称
User.GetValueByName


*'根据[[ID]]获得属性名称
User.GetNameById
User.GetNameById




[[category:AspMVC|T]]
[[category:AspMVC|T]]

2010年4月16日 (五) 10:54的最新版本

导航: 上一页

AspMvc中,对对像映射的代码,我们关没有单独存放一个文件.我们使用Cache,在第一次访问生成,存在Cache中,等下次使用时,程序再访问Cache,以提高效率.下面我们就介绍一个每个对像所具有的属性与方法

例:对像User 属性 username,password

对应这个像对所具有的属性与方法为:

User.Attrs

'该对像属性集合

User.AttrCount

'该对像属性个数


'属性username的Get与Set

User.Getusername

User.Setusername


'属性Password的Get与Set

User.Getpassword

User.Setpassword

'根据ID设置值

User.SetValueById

'根据ID取值

User.GetValueById

'根据属性名设置值

User.SetValueByName

'根据属性名取值

User.GetValueByName

'根据ID获得属性名称

User.GetNameById