AspMVC映身对像
来自站长百科
导航: 上一页
在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