예제 #1
0
        /// <summary>
        ///     Creates a new instance with all options the same as for this instance, but with the given option changed.
        ///     It is unusual to call this method directly. Instead use <see cref="DbContextOptionsBuilder" />.
        /// </summary>
        /// <param name="querySplittingBehavior"> The option to change. </param>
        /// <returns> A new instance with the option changed. </returns>
        public virtual RelationalOptionsExtension WithUseQuerySplittingBehavior(QuerySplittingBehavior querySplittingBehavior)
        {
            var clone = Clone();

            clone._querySplittingBehavior = querySplittingBehavior;

            return(clone);
        }
예제 #2
0
 /// <summary>
 ///     Configures the <see cref="QuerySplittingBehavior"/> to use when loading related collections in a query.
 /// </summary>
 /// <returns> The same builder instance so that multiple calls can be chained. </returns>
 public virtual TBuilder UseQuerySplittingBehavior(QuerySplittingBehavior querySplittingBehavior)
 => WithOption(e => (TExtension)e.WithUseQuerySplittingBehavior(querySplittingBehavior));
예제 #3
0
 /// <summary>
 /// Configures the <see cref="QuerySplittingBehavior" /> to use when loading related collections in a query.
 /// </summary>
 public virtual DbFactoryDbContextOptionsBuilder QuerySplittingBehavior(QuerySplittingBehavior querySplittingBehavior)
 => WithOption(e => e.WithQuerySplittingBehavior(querySplittingBehavior));
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public SelectExpressionProjectionApplyingExpressionVisitor(QuerySplittingBehavior?querySplittingBehavior)
 {
     _querySplittingBehavior = querySplittingBehavior ?? QuerySplittingBehavior.SingleQuery;
 }