src/Misc/EFTools/EntityDesignEntityDesigner/CustomCode/Validation/EntityType.cs
/// <summary>
///     Validate inheritance (check for circular inheritance)
/// </summary>
/// <param name="context"></param>
Validate inheritance (check for circular inheritance)
Validate inheritance ( check for circular inheritance )
[ValidationMethod(ValidationCategories.Open | ValidationCategories.Save, CustomCategory = "OnTransactionCommited")]
        private void ValidateInheritance(ValidationContext context)
        {
            var circularPath = String.Empty;
            if (HasCircularInheritance(out circularPath))
            {
                var errorMessage = String.Format(
                    CultureInfo.CurrentCulture,
                    Resources.Error_CircularEntityInheritanceFound,
                    Name, circularPath);
                context.LogError(errorMessage, Resources.ErrorCode_CircularEntityInheritanceFound, this);
            }
        }
[ ValidationMethod ( ValidationCategories . Open | ValidationCategories . Save , CustomCategory = " " ) ] private void ValidateInheritance ( ValidationContext context ) { var circularPath = String . Empty ; if ( HasCircularInheritance ( out circularPath ) ) { var errorMessage = String . Format ( CultureInfo . CurrentCulture , Resources . Error_CircularEntityInheritanceFound , Name , circularPath ) ; context . LogError ( errorMessage , Resources . ErrorCode_CircularEntityInheritanceFound , this ) ; } }
Validate inheritance (check for circular inheritance)
Validate inheritance ( check for circular inheritance )
context
ValidationContext
None