using System; using DevExpress.Xpo; using System.ComponentModel; public struct SalesKey { [Persistent("stor_id")] public string StorId {get; set;} [Persistent("ord_num")] public string OrdNum {get; set;} [Persistent("title_id")] public string TitleId {get; set;} } [Persistent("sales"), OptimisticLocking(false)] public class Sales : XPBaseObject { [Key, Persistent, Browsable(false)] public SalesKey Key {get; set;} [Persistent("payterms")] public string PayTerms {...} ... // other properties }
参考:https://supportcenter.devexpress.com/ticket/details/a2615/xpo-how-to-map-persistent-objects-to-database-tables-with-compound-or-composite-multi#
(完)