Ejemplo n.º 1
0
        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);
                }

            });
        }
Ejemplo n.º 2
0
 public XRootNamespace(property root)
 {
     this.doc = new XDocument(root.Untyped);
     this.rootObject = root;
 }