AspMVC映身对像:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
第10行: 第10行:


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


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




*'属性username的Get与Set
*'属性username的Get与Set
User.Getusername
User.Getusername


User.Setusername
User.Setusername




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


User.Setpassword
User.Setpassword


*'根据ID设置值
*'根据ID设置值
User.SetValueById
User.SetValueById


*'根据[[ID]]取值
*'根据[[ID]]取值
User.GetValueById
User.GetValueById
 
*'根据属性名设置值
*'根据属性名设置值
User.SetValueByName
User.SetValueByName


*'根据[[属性]]名取值
*'根据[[属性]]名取值
User.GetValueByName
User.GetValueByName


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




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

2010年4月16日 (五) 10:53的版本

导航: 上一页

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