internal static void SetUniqueProperties(MemberInfo memberInfo, property p) { SetUniqueProperties(memberInfo, ua => { p.uniquekey = ua.KeyName ?? memberInfo.DeclaringType.Name + "_UniqueKey"; var column = p.column.SingleOrDefault(); if (column != null) { column.notnull = ua.NotNull; column.uniquekey = ua.KeyName ?? ("UQ_" + memberInfo.DeclaringType.Name); } { p.notnull = ua.NotNull; p.uniquekey = ua.KeyName ?? ("UQ_" + memberInfo.DeclaringType.Name); } }); }
public XRootNamespace(property root) { this.doc = new XDocument(root.Untyped); this.rootObject = root; }