05-01 Create a Persistent Object(创建持久对象)

Create a Persistent Object(创建持久对象)

The XPO ORM can load and save to a data store only persistent objects.
XPO ORM只能加载持久对象并将其保存到数据存储中。

You make your business objects persistent in any of the following ways:
您可以通过以下任何方式使您的业务对象持久化:

  • derive an object from any of the following base classes (XPO Classes Comparison):(从以下任何基类派生对象(XPO类比较):)
    • PersistentBase
    • XPBaseObject
    • XPObject
    • XPLiteObject
    • XPCustomObject
  • implement IXPObject and IComparable interfaces in your object,(在对象中实现IXPObject和ICompable接口,)
  • decorate your object with the PersistentAttribute and specify a key field.(使用PersitentAtual装饰您的对象并指定一个键字段。)

Tip<

你可能感兴趣的:(XPO,数据库,.net,XPO)