标签:color 如何 sample public esc 问题 code ref desc
一、问题
1. 在XAF中如何验证多个属性唯一值?
二、解决方法
使用RuleCombinationOfPropertiesIsUnique
[RuleCombinationOfPropertiesIsUnique("SampleRule", DefaultContexts.Save, "Description, Id")] public class SampleClass : BaseObject { private int id; private string description; public SampleClass(Session session) : base(session) { } public int Id { get { return id; } set { SetPropertyValue("Id", ref id, value); } } public string Description { get { return description; } set { SetPropertyValue("Description", ref description, value); } } }
标签:color 如何 sample public esc 问题 code ref desc
原文地址:https://www.cnblogs.com/qy1234/p/10552882.html