Exemple #1
0
        /// <summary>
        /// If the <paramref name="propertyWrapper"/> is defined as Composition or Aggregation via attributes then return true.
        /// </summary>
        /// <param name="propertyWrapper"></param>
        /// <returns></returns>
        private static bool IsDefinedAsCompositionOrAggregation(PropertyWrapper propertyWrapper)
        {
            if (propertyWrapper == null)
            {
                return(false);
            }
            var autoMapAttribute = propertyWrapper.GetAttribute <AutoMapOneToOneAttribute>();

            if (autoMapAttribute == null)
            {
                return(false);
            }
            return(autoMapAttribute.RelationshipType != RelationshipType.Association);
        }
 private AutoMapOneToOneAttribute GetAutomapAttribute(PropertyWrapper propertyWrapper)
 {
     return propertyWrapper.GetAttribute<AutoMapOneToOneAttribute>();
 }
 /// <summary>
 /// If the <paramref name="propertyWrapper"/> is defined as Composition or Aggregation via attributes then return true.
 /// </summary>
 /// <param name="propertyWrapper"></param>
 /// <returns></returns>
 private static bool IsDefinedAsCompositionOrAggregation(PropertyWrapper propertyWrapper)
 {
     if(propertyWrapper == null) return false;
     var autoMapAttribute = propertyWrapper.GetAttribute<AutoMapOneToOneAttribute>();
     if (autoMapAttribute == null) return false;
     return (autoMapAttribute.RelationshipType != RelationshipType.Association);
 }