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