コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryHintDbCommandInterceptor"/> class.
 /// </summary>
 /// <param name="dbContext">The database context.</param>
 /// <param name="hintType">Type of the hint.</param>
 public QueryHintDbCommandInterceptor( Rock.Data.DbContext dbContext, QueryHintType hintType )
     : this(dbContext, hintType.ConvertToString().Replace( "_", " " ))
 {
     // intentionally blank
 }
コード例 #2
0
 /// <summary>
 /// QueryHintScope allows a developer to specify a SQL Server Query Hint to apply to all queries executed within the scope.
 /// NOTE: Make sure to use a USING { } pattern to prevent the query hint from getting added to other queries that fire off later
 /// </summary>
 /// <example>
 /// using ( new QueryHintScope( rockContext, QueryHintType.RECOMPILE ) )
 /// {
 ///     gTransactions.SetLinqDataSource( qry.AsNoTracking() );
 /// }
 /// </example>
 /// <param name="context">The context.</param>
 /// <param name="hintType">The hint.</param>
 public QueryHintScope(Rock.Data.DbContext context, QueryHintType hintType)
     : this(context, hintType.ConvertToString().Replace("_", " "))
 {
     // intentionally blank
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryHintDbCommandInterceptor"/> class.
 /// </summary>
 /// <param name="dbContext">The database context.</param>
 /// <param name="hintType">Type of the hint.</param>
 public QueryHintDbCommandInterceptor(Rock.Data.DbContext dbContext, QueryHintType hintType)
     : this(dbContext, hintType.ConvertToString().Replace("_", " "))
 {
     // intentionally blank
 }