Property Set和Property Let有什么区别???

hongbo163 2004-08-11 05:09:13
不都是给属性赋值的语句过程么??
...全文
151 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
flyingZFX 2004-08-12
  • 打赏
  • 举报
回复
Let 对一般属性

Set 是对(object对象)的
chenyu5188 2004-08-12
  • 打赏
  • 举报
回复
Property Let主要用于一般数据类型的属性过程

Property Set主要用于对象类型的属生过程
hongbo163 2004-08-11
  • 打赏
  • 举报
回复
我自己测试了一下
Property Let是针对一般的属性
Property Set是针对object属性
In this article I want to discuss the lazy loading mechanism provided by NHibernate. It is recommended for maximum flexibility to define all relations in your domain as lazy loadable. This is the default behavior of NHibernate since version 1.2. But this can lead to some undesired effects if querying your data. Let's discuss these effects and how to avoid them. Term Paper AND Research Paper In my previous posts I showed how to prepare your system for NHibernate and how to implement a first NHibernate base application. This post is based on those two articles. Thesis AND Dissertation AND Essay The Domain Let's first define a simple domain. It shows part of an order entry system. I keep this model as simple as possible (a real domain model would be more complex) but it contains all aspects we want to discuss in this post. Below is the class diagram of our model We have an order entity which can be placed by a customer entity. Each order can have many order line entities. Each of the three entity types is uniquely identified by a property Id (surrogate key). The Mapping Files We have to write one mapping file per entity. It is recommended that you always have one mapping per file. Don't forget to set the Build Action of each mapping file to Embedded Resource. People often tend to forget it and the subsequent errors raised by NHibernate are not always obvious. Also do not forget to give the mapping files the correct name, that is *.hbm.xml where * denotes the placeholder for the entity name. The mapping for the Order entity might be implemented as follows <property name="OrderNumber"/> <property name="OrderDate"/> <set name="OrderLines" cascade="all-delete-orphan" > set> Analogous you can implement the mappings for the Customer entity <property name="CompanyName"/> and finally the mapping for the OrderLine entity. <property name="Amount"/> <property name="ProductName"/>

863

社区成员

发帖
与我相关
我的任务
社区描述
VB COM/DCOM/COM+
c++ 技术论坛(原bbs)
社区管理员
  • COM/DCOM/COM+社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧