Service dependencies parameter class for RelationalQueryCompilationContext

This type is typically used by database providers (and other extensions). It is generally not used in application code.

Do not construct instances of this class directly from either provider or application code as the constructor signature may change as new dependencies are added. Instead, use this type in your constructor so that an instance will be created and injected automatically by the dependency injection container. To create an instance with some dependent services replaced, first resolve the object from the dependency injection container, then replace selected services using the 'With...' methods. Do not call the constructor at any point in this process.

The service lifetime is ServiceLifetime.Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

 public RalmsCompilationQueryableFactory(
     QueryCompilationContextDependencies dependencies,
     RelationalQueryCompilationContextDependencies relationalDependencies)
     : base(dependencies)
 {
     relationalDependencies
     .NodeTypeProviderFactory
     .RegisterMethods(WithNoLockExpressionNode.SupportedMethods, typeof(WithNoLockExpressionNode));
 }
        public CypherQueryCompilationContextFactory(
            [NotNull] QueryCompilationContextDependencies dependencies,
            [NotNull] RelationalQueryCompilationContextDependencies relationalDependencies
            ) : base(dependencies)
        {
            Check.NotNull(relationalDependencies, nameof(relationalDependencies));

            // TODO: Add any Cypher specific nodes (relinq)
        }
示例#3
0
 /// <summary>
 ///     Creates a new instance of the <see cref="RelationalQueryCompilationContext" /> class.
 /// </summary>
 /// <param name="dependencies">Parameter object containing dependencies for this class.</param>
 /// <param name="relationalDependencies">Parameter object containing relational dependencies for this class.</param>
 /// <param name="async">A bool value indicating whether it is for async query.</param>
 public RelationalQueryCompilationContext(
     QueryCompilationContextDependencies dependencies,
     RelationalQueryCompilationContextDependencies relationalDependencies,
     bool async)
     : base(dependencies, async)
 {
     RelationalDependencies = relationalDependencies;
     QuerySplittingBehavior = RelationalOptionsExtension.Extract(ContextOptions).QuerySplittingBehavior;
 }
示例#4
0
        /// <summary>
        ///     Creates a new instance of the <see cref="RelationalQueryCompilationContext" /> class.
        /// </summary>
        /// <param name="dependencies"> Parameter object containing dependencies for this class. </param>
        /// <param name="relationalDependencies"> Parameter object containing relational dependencies for this class. </param>
        /// <param name="async"> A bool value indicating whether it is for async query. </param>
        public RelationalQueryCompilationContext(
            [NotNull] QueryCompilationContextDependencies dependencies,
            [NotNull] RelationalQueryCompilationContextDependencies relationalDependencies,
            bool async)
            : base(dependencies, async)
        {
            Check.NotNull(relationalDependencies, nameof(relationalDependencies));

            RelationalDependencies = relationalDependencies;
        }
示例#5
0
        public RelationalQueryCompilationContextFactory(
            [NotNull] QueryCompilationContextDependencies dependencies,
            [NotNull] RelationalQueryCompilationContextDependencies relationalDependencies)
            : base(dependencies)
        {
            Check.NotNull(relationalDependencies, nameof(relationalDependencies));

            relationalDependencies
            .NodeTypeProviderFactory
            .RegisterMethods(FromSqlExpressionNode.SupportedMethods, typeof(FromSqlExpressionNode));
        }
        /// <summary>
        ///     Creates a new instance of the <see cref="RelationalQueryCompilationContext" /> class.
        /// </summary>
        /// <param name="dependencies"> Parameter object containing dependencies for this class. </param>
        /// <param name="relationalDependencies"> Parameter object containing relational dependencies for this class. </param>
        /// <param name="async"> A bool value indicating whether it is for async query. </param>
        public RelationalQueryCompilationContext(
            [NotNull] QueryCompilationContextDependencies dependencies,
            [NotNull] RelationalQueryCompilationContextDependencies relationalDependencies,
            bool async)
            : base(dependencies, async)
        {
            Check.NotNull(relationalDependencies, nameof(relationalDependencies));

            RelationalDependencies = relationalDependencies;
            QuerySplittingBehavior = RelationalOptionsExtension.Extract(ContextOptions).QuerySplittingBehavior;
        }
示例#7
0
 public RalmsCompilationQueryableFactory(
     QueryCompilationContextDependencies dependencies,
     RelationalQueryCompilationContextDependencies relationalDependencies)
     : base(dependencies)
     => relationalDependencies