Exemplo n.º 1
0
 public QueryBuffer(
     [NotNull] IStateManager stateManager,
     [NotNull] IKeyValueFactorySource keyValueFactorySource)
 {
     _stateManager = stateManager;
     _keyValueFactorySource = keyValueFactorySource;
 }
Exemplo n.º 2
0
 public QueryBuffer(
     [NotNull] IStateManager stateManager,
     [NotNull] IKeyValueFactorySource keyValueFactorySource)
 {
     _stateManager          = stateManager;
     _keyValueFactorySource = keyValueFactorySource;
 }
Exemplo n.º 3
0
        public RelationalEntityQueryableExpressionVisitor(
            [NotNull] IModel model,
            [NotNull] IKeyValueFactorySource keyValueFactorySource,
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] ICommandBuilderFactory commandBuilderFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
            [NotNull] RelationalQueryModelVisitor queryModelVisitor,
            [CanBeNull] IQuerySource querySource)
            : base(Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)))
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(keyValueFactorySource, nameof(keyValueFactorySource));
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));

            _model = model;
            _keyValueFactorySource        = keyValueFactorySource;
            _selectExpressionFactory      = selectExpressionFactory;
            _materializerFactory          = materializerFactory;
            _commandBuilderFactory        = commandBuilderFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
            _querySource = querySource;
        }
 public RelationalQueryContextFactory(
     [NotNull] IStateManager stateManager,
     [NotNull] IKeyValueFactorySource keyValueFactorySource,
     [NotNull] IRelationalConnection connection)
     : base(stateManager, keyValueFactorySource)
 {
     _connection = connection;
 }
        public InMemoryQueryContextFactory(
            [NotNull] IStateManager stateManager,
            [NotNull] IKeyValueFactorySource keyValueFactorySource,
            [NotNull] IInMemoryDatabase database)
            : base(stateManager, keyValueFactorySource)
        {
            Check.NotNull(database, nameof(database));

            _database = database;
        }
        protected QueryContextFactory(
            [NotNull] IStateManager stateManager,
            [NotNull] IKeyValueFactorySource keyValueFactorySource)
        {
            Check.NotNull(stateManager, nameof(stateManager));
            Check.NotNull(keyValueFactorySource, nameof(keyValueFactorySource));

            _stateManager = stateManager;
            _keyValueFactorySource = keyValueFactorySource;
        }
        protected QueryContextFactory(
            [NotNull] IStateManager stateManager,
            [NotNull] IKeyValueFactorySource keyValueFactorySource)
        {
            Check.NotNull(stateManager, nameof(stateManager));
            Check.NotNull(keyValueFactorySource, nameof(keyValueFactorySource));

            _stateManager          = stateManager;
            _keyValueFactorySource = keyValueFactorySource;
        }
 public EntityEntryMetadataServices(
     [NotNull] IOriginalValuesFactory originalValuesFactory,
     [NotNull] IRelationshipsSnapshotFactory relationshipsSnapshotFactory,
     [NotNull] IStoreGeneratedValuesFactory storeGeneratedValuesFactory,
     [NotNull] IKeyValueFactorySource keyValueFactorySource)
 {
     _originalValuesFactory = originalValuesFactory;
     _relationshipsSnapshotFactory = relationshipsSnapshotFactory;
     _storeGeneratedValuesFactory = storeGeneratedValuesFactory;
     _keyValueFactorySource = keyValueFactorySource;
 }
 public EntityEntryMetadataServices(
     [NotNull] IOriginalValuesFactory originalValuesFactory,
     [NotNull] IRelationshipsSnapshotFactory relationshipsSnapshotFactory,
     [NotNull] IStoreGeneratedValuesFactory storeGeneratedValuesFactory,
     [NotNull] IKeyValueFactorySource keyValueFactorySource)
 {
     _originalValuesFactory        = originalValuesFactory;
     _relationshipsSnapshotFactory = relationshipsSnapshotFactory;
     _storeGeneratedValuesFactory  = storeGeneratedValuesFactory;
     _keyValueFactorySource        = keyValueFactorySource;
 }
        public InMemoryEntityQueryableExpressionVisitorFactory(
            [NotNull] IModel model,
            [NotNull] IKeyValueFactorySource keyValueFactorySource,
            [NotNull] IMaterializerFactory materializerFactory)
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(keyValueFactorySource, nameof(keyValueFactorySource));
            Check.NotNull(materializerFactory, nameof(materializerFactory));

            _model = model;
            _keyValueFactorySource = keyValueFactorySource;
            _materializerFactory = materializerFactory;
        }
Exemplo n.º 11
0
        public InMemoryEntityQueryableExpressionVisitorFactory(
            [NotNull] IModel model,
            [NotNull] IKeyValueFactorySource keyValueFactorySource,
            [NotNull] IMaterializerFactory materializerFactory)
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(keyValueFactorySource, nameof(keyValueFactorySource));
            Check.NotNull(materializerFactory, nameof(materializerFactory));

            _model = model;
            _keyValueFactorySource = keyValueFactorySource;
            _materializerFactory   = materializerFactory;
        }
        public InMemoryEntityQueryableExpressionVisitor(
            [NotNull] IModel model,
            [NotNull] IKeyValueFactorySource keyValueFactorySource,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] EntityQueryModelVisitor entityQueryModelVisitor,
            [CanBeNull] IQuerySource querySource)
            : base(Check.NotNull(entityQueryModelVisitor, nameof(entityQueryModelVisitor)))
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(keyValueFactorySource, nameof(keyValueFactorySource));
            Check.NotNull(materializerFactory, nameof(materializerFactory));

            _model = model;
            _keyValueFactorySource = keyValueFactorySource;
            _materializerFactory   = materializerFactory;
            _querySource           = querySource;
        }
        public InMemoryEntityQueryableExpressionVisitor(
            [NotNull] IModel model,
            [NotNull] IKeyValueFactorySource keyValueFactorySource,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] EntityQueryModelVisitor entityQueryModelVisitor,
            [CanBeNull] IQuerySource querySource)
            : base(Check.NotNull(entityQueryModelVisitor, nameof(entityQueryModelVisitor)))
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(keyValueFactorySource, nameof(keyValueFactorySource));
            Check.NotNull(materializerFactory, nameof(materializerFactory));

            _model = model;
            _keyValueFactorySource = keyValueFactorySource;
            _materializerFactory = materializerFactory;
            _querySource = querySource;
        }
Exemplo n.º 14
0
        public EntityTrackingInfo(
            [NotNull] IKeyValueFactorySource keyValueFactorySource,
            [NotNull] QueryCompilationContext queryCompilationContext,
            [NotNull] QuerySourceReferenceExpression querySourceReferenceExpression,
            [NotNull] IEntityType entityType)
        {
            Check.NotNull(keyValueFactorySource, nameof(keyValueFactorySource));
            Check.NotNull(querySourceReferenceExpression, nameof(querySourceReferenceExpression));
            Check.NotNull(entityType, nameof(entityType));
            Check.NotNull(queryCompilationContext, nameof(queryCompilationContext));

            QuerySourceReferenceExpression = querySourceReferenceExpression;

            _entityType = entityType;

            _keyValueFactory = keyValueFactorySource.GetKeyFactory(_entityType.FindPrimaryKey());

            _includedNavigationPaths
                = queryCompilationContext
                  .GetTrackableIncludes(querySourceReferenceExpression.ReferencedQuerySource);

            if (_includedNavigationPaths != null)
            {
                _includedEntityTrackingInfos = new Dictionary <INavigation, IncludedEntityTrackingInfo>();

                foreach (var navigation
                         in _includedNavigationPaths.SelectMany(ns => ns))
                {
                    if (!_includedEntityTrackingInfos.ContainsKey(navigation))
                    {
                        var targetEntityType = navigation.GetTargetType();

                        _includedEntityTrackingInfos.Add(
                            navigation,
                            new IncludedEntityTrackingInfo(
                                targetEntityType,
                                keyValueFactorySource.GetKeyFactory(targetEntityType.FindPrimaryKey())));
                    }
                }
            }
        }
        public RelationalEntityQueryableExpressionVisitorFactory(
            [NotNull] IModel model,
            [NotNull] IKeyValueFactorySource keyValueFactorySource,
            [NotNull] ISelectExpressionFactory selectExpressionFactory,
            [NotNull] IMaterializerFactory materializerFactory,
            [NotNull] ICommandBuilderFactory commandBuilderFactory,
            [NotNull] IRelationalAnnotationProvider relationalAnnotationProvider)
        {
            Check.NotNull(model, nameof(model));
            Check.NotNull(keyValueFactorySource, nameof(keyValueFactorySource));
            Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
            Check.NotNull(materializerFactory, nameof(materializerFactory));
            Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
            Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));

            _model = model;
            _keyValueFactorySource = keyValueFactorySource;
            _selectExpressionFactory = selectExpressionFactory;
            _materializerFactory = materializerFactory;
            _commandBuilderFactory = commandBuilderFactory;
            _relationalAnnotationProvider = relationalAnnotationProvider;
        }
 public EntityTrackingInfoFactory(
     [NotNull] IKeyValueFactorySource keyValueFactorySource)
 {
     _keyValueFactorySource = keyValueFactorySource;
 }
 public EntityTrackingInfoFactory(
     [NotNull] IKeyValueFactorySource keyValueFactorySource)
 {
     _keyValueFactorySource = keyValueFactorySource;
 }