Ejemplo n.º 1
0
        /// <summary>
        ///     Adds or updates an annotation on the navigation property. If an annotation
        ///     with the key specified in <paramref name="annotation" /> already exists
        ///     its value will be updated.
        /// </summary>
        /// <param name="annotation"> The key of the annotation to be added or updated. </param>
        /// <param name="value"> The value to be stored in the annotation. </param>
        /// <returns> The same builder instance so that multiple configuration calls can be chained. </returns>
        public virtual NavigationBuilder HasAnnotation([NotNull] string annotation, [NotNull] object value)
        {
            Check.NotEmpty(annotation, nameof(annotation));
            Check.NotNull(value, nameof(value));

            if (NavBuilder != null)
            {
                NavBuilder.HasAnnotation(annotation, value, ConfigurationSource.Explicit);
            }
            else
            {
                SkipNavBuilder.HasAnnotation(annotation, value, ConfigurationSource.Explicit);
            }

            return(this);
        }