示例#1
0
        /// <summary>
        ///     Creates the convention set to be used for the model. Uses the <see cref="CoreConventionSetBuilder" />
        ///     if <paramref name="conventionSetBuilder" /> is null.
        /// </summary>
        /// <param name="conventionSetBuilder"> The convention set builder to be used. </param>
        /// <returns> The convention set to be used. </returns>
        protected virtual ConventionSet CreateConventionSet([CanBeNull] IConventionSetBuilder conventionSetBuilder)
        {
            var conventionSet = CoreConventionSetBuilder.CreateConventionSet();

            return(conventionSetBuilder == null
                ? conventionSet
                : conventionSetBuilder.AddConventions(conventionSet));
        }
示例#2
0
 /// <summary>
 ///     Creates the convention set to be used for the model. Only uses the <see cref="CoreConventionSetBuilder" />
 ///     if <paramref name="conventionSetBuilder" /> is null.
 /// </summary>
 /// <param name="conventionSetBuilder"> The provider convention set builder to be used. </param>
 /// <returns> The convention set to be used. </returns>
 protected virtual ConventionSet CreateConventionSet([NotNull] IConventionSetBuilder conventionSetBuilder)
 => conventionSetBuilder.AddConventions(Dependencies.CoreConventionSetBuilder.CreateConventionSet());
 /// <summary>
 ///     Creates the convention set to be used for the model. Only uses the <see cref="CoreConventionSetBuilder" />
 ///     if <paramref name="conventionSetBuilder" /> is null.
 /// </summary>
 /// <param name="conventionSetBuilder"> The provider convention set builder to be used. </param>
 /// <param name="loggers"> The logger to use. </param>
 /// <returns> The convention set to be used. </returns>
 protected virtual ConventionSet CreateConventionSet(
     [NotNull] IConventionSetBuilder conventionSetBuilder,
     DiagnosticsLoggers loggers)
 => conventionSetBuilder.AddConventions(
     Dependencies.CoreConventionSetBuilder.CreateConventionSet(loggers));