Exemple #1
0
        /// <summary>
        /// If no single rev rel and Attribute with no RevRelName then RevRelName = ClassName
        /// If no single rev rel and Att with RevRelName then RevRelName = DeclaredRevRelName
        /// If has single rev rel then RevRelName = foundRevRelationshipName
        /// </summary>
        /// <typeparam name="TAttributeType"></typeparam>
        /// <returns></returns>
        public virtual string GetSingleReverseRelationshipName <TAttributeType>()
            where TAttributeType : AutoMapRelationshipAttribute
        {
            string mappedReverseRelationshipName = this.GetMappedReverseRelationshipName <TAttributeType>();

            if (!string.IsNullOrEmpty(mappedReverseRelationshipName))
            {
                return(mappedReverseRelationshipName);
            }
            PropertyWrapper singleReverseRelProp = this.SingleReverseRelProp;

            return(singleReverseRelProp == null ? this.DeclaringClassName : singleReverseRelProp.Name);
        }
Exemple #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(PropertyWrapper other)
 {
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     if (ReferenceEquals(other, null))
     {
         return(false);
     }
     if (other.PropertyInfo == null && PropertyInfo == null)
     {
         return(true);
     }
     if (ReferenceEquals(other.PropertyInfo, null))
     {
         return(false);
     }
     return(ReferenceEquals(other.PropertyInfo, PropertyInfo));
     //return other.PropertyInfo.Equals(PropertyInfo);
 }