From 453c0cc7098537ad7424ae972752dabeba14dec5 Mon Sep 17 00:00:00 2001 From: Arthur Vickers Date: Tue, 19 Oct 2021 19:54:36 +0100 Subject: [PATCH] Use remarks in XML docs Fixes #25529 --- .../ObservableCollectionListSource.cs | 12 +- .../Infrastructure/ILazyLoader.cs | 14 +- .../AbstractionsStrings.Designer.cs | 13 +- .../Diagnostics/CosmosEventId.cs | 72 +-- .../CosmosDatabaseFacadeExtensions.cs | 12 +- .../CosmosPropertyBuilderExtensions.cs | 18 +- .../Extensions/CosmosQueryableExtensions.cs | 14 +- .../CosmosServiceCollectionExtensions.cs | 37 +- .../CosmosDbContextOptionsBuilder.cs | 28 +- .../Internal/CosmosSingletonOptions.cs | 20 +- .../Internal/ICosmosSingletonOptions.cs | 22 +- .../Internal/CosmosConventionSetBuilder.cs | 11 +- .../Conventions/StoreKeyConvention.cs | 12 +- .../CosmosQueryCompilationContextFactory.cs | 22 +- ...mosQueryTranslationPostprocessorFactory.cs | 10 +- ...smosQueryTranslationPreprocessorFactory.cs | 10 +- ...thodTranslatingExpressionVisitorFactory.cs | 10 +- .../Storage/Internal/CosmosClientWrapper.cs | 22 +- .../Storage/Internal/CosmosDatabaseWrapper.cs | 22 +- .../CosmosExecutionStrategyFactory.cs | 22 +- .../Internal/ISingletonCosmosClientWrapper.cs | 22 +- .../Internal/SingletonCosmosClientWrapper.cs | 22 +- .../DesignTimeConnectionStringResolver.cs | 22 +- .../IDesignTimeConnectionStringResolver.cs | 10 +- src/EFCore.Design/Design/OperationExecutor.cs | 84 ++- ...MigrationOperationGeneratorDependencies.cs | 46 +- .../CSharpMigrationsGeneratorDependencies.cs | 45 +- .../CSharpSnapshotGeneratorDependencies.cs | 45 +- .../MigrationsCodeGeneratorDependencies.cs | 45 +- .../MigrationsScaffolderDependencies.cs | 51 +- .../ModelCodeGeneratorDependencies.cs | 45 +- .../Diagnostics/InMemoryEventId.cs | 32 +- .../InMemoryDatabaseFacadeExtensions.cs | 12 +- .../InMemoryServiceCollectionExtensions.cs | 20 +- .../InMemoryDbContextOptionsBuilder.cs | 18 +- .../Internal/IInMemorySingletonOptions.cs | 22 +- .../Internal/InMemorySingletonOptions.cs | 22 +- .../InMemoryConventionSetBuilder.cs | 39 +- .../Internal/InMemoryQueryContextFactory.cs | 22 +- ...thodTranslatingExpressionVisitorFactory.cs | 20 +- .../Storage/InMemoryDatabaseRoot.cs | 18 +- .../Storage/Internal/IInMemoryDatabase.cs | 22 +- .../Storage/Internal/InMemoryDatabase.cs | 22 +- .../Internal/InMemoryDatabaseCreator.cs | 22 +- .../Internal/InMemoryTransactionManager.cs | 22 +- .../Internal/InMemoryTypeMappingSource.cs | 20 +- .../InMemoryValueGeneratorSelector.cs | 22 +- .../Internal/ProxiesConventionSetPlugin.cs | 24 +- src/EFCore.Proxies/ProxiesExtensions.cs | 48 +- .../ProxiesServiceCollectionExtensions.cs | 18 +- .../Design/AnnotationCodeGenerator.cs | 206 +++---- .../AnnotationCodeGeneratorDependencies.cs | 45 +- ...rameworkRelationalDesignServicesBuilder.cs | 32 +- ...nalCSharpRuntimeAnnotationCodeGenerator.cs | 13 +- ...timeAnnotationCodeGeneratorDependencies.cs | 45 +- .../Diagnostics/DbCommandInterceptor.cs | 92 ++- .../Diagnostics/DbConnectionInterceptor.cs | 6 +- .../Diagnostics/DbTransactionInterceptor.cs | 40 +- .../Diagnostics/IDbCommandInterceptor.cs | 96 ++- .../Diagnostics/IDbConnectionInterceptor.cs | 12 +- .../Diagnostics/IDbTransactionInterceptor.cs | 46 +- .../Diagnostics/RelationalEventId.cs | 458 +++++++------- .../RelationalDatabaseFacadeExtensions.cs | 224 ++++--- .../RelationalDbFunctionsExtensions.cs | 14 +- .../RelationalEntityTypeExtensions.cs | 56 +- .../RelationalPropertyBuilderExtensions.cs | 80 +-- .../RelationalPropertyExtensions.cs | 34 +- .../RelationalQueryableExtensions.cs | 40 +- ...ntityFrameworkRelationalServicesBuilder.cs | 39 +- .../RelationalDbContextOptionsBuilder.cs | 30 +- .../RelationalModelCustomizer.cs | 10 +- .../RelationalModelDependencies.cs | 33 +- .../RelationalModelRuntimeInitializer.cs | 10 +- ...onalModelRuntimeInitializerDependencies.cs | 33 +- .../RelationalModelValidator.cs | 22 +- .../RelationalModelValidatorDependencies.cs | 37 +- .../RelationalOptionsExtension.cs | 16 +- .../Metadata/Builders/DbFunctionBuilder.cs | 16 +- .../Builders/DbFunctionParameterBuilder.cs | 12 +- .../Builders/IConventionDbFunctionBuilder.cs | 18 +- .../Metadata/Builders/TableBuilder.cs | 6 +- .../Metadata/Builders/TableBuilder`.cs | 6 +- .../RelationalConventionSetBuilder.cs | 16 +- ...ationalConventionSetBuilderDependencies.cs | 39 +- .../Metadata/IRelationalAnnotationProvider.cs | 16 +- .../InternalDbFunctionParameterBuilder.cs | 8 +- .../Metadata/RelationalAnnotationProvider.cs | 14 +- ...elationalAnnotationProviderDependencies.cs | 39 +- .../Migrations/HistoryRepository.cs | 30 +- .../HistoryRepositoryDependencies.cs | 47 +- .../Migrations/IHistoryRepository.cs | 14 +- .../Migrations/IMigrationCommandExecutor.cs | 12 +- .../IMigrationsAnnotationProvider.cs | 16 +- .../Migrations/IMigrationsAssembly.cs | 12 +- .../Migrations/IMigrationsIdGenerator.cs | 12 +- .../Migrations/IMigrationsModelDiffer.cs | 16 +- .../Migrations/IMigrationsSqlGenerator.cs | 14 +- src/EFCore.Relational/Migrations/IMigrator.cs | 14 +- .../Internal/MigrationCommandExecutor.cs | 20 +- .../Migrations/Internal/MigrationsAssembly.cs | 22 +- .../Internal/MigrationsIdGenerator.cs | 20 +- .../Internal/MigrationsModelDiffer.cs | 65 +- .../Migrations/Internal/Migrator.cs | 48 +- src/EFCore.Relational/Migrations/Migration.cs | 60 +- .../MigrationsAnnotationProvider.cs | 14 +- ...igrationsAnnotationProviderDependencies.cs | 39 +- .../MigrationsAssemblyExtensions.cs | 14 +- .../Migrations/MigrationsSqlGenerator.cs | 174 +++--- .../MigrationsSqlGeneratorDependencies.cs | 33 +- .../Operations/Builders/ColumnsBuilder.cs | 10 +- .../Operations/IAlterMigrationOperation.cs | 12 +- .../Migrations/ReferentialAction.cs | 12 +- .../Query/IMemberTranslatorPlugin.cs | 16 +- .../Query/IMemberTranslatorProvider.cs | 14 +- .../Query/IMethodCallTranslatorPlugin.cs | 16 +- .../Query/IMethodCallTranslatorProvider.cs | 14 +- .../Query/IQuerySqlGeneratorFactory.cs | 14 +- ...tionalParameterBasedSqlProcessorFactory.cs | 16 +- .../Query/IRelationalQueryStringFactory.cs | 12 +- ...lSqlTranslatingExpressionVisitorFactory.cs | 16 +- .../Query/ISqlExpressionFactory.cs | 16 +- .../Internal/QuerySqlGeneratorFactory.cs | 20 +- ...tionalParameterBasedSqlProcessorFactory.cs | 22 +- ...elationalQueryCompilationContextFactory.cs | 22 +- .../Internal/RelationalQueryContextFactory.cs | 22 +- ...nalQueryTranslationPostprocessorFactory.cs | 20 +- ...onalQueryTranslationPreprocessorFactory.cs | 22 +- ...thodTranslatingExpressionVisitorFactory.cs | 22 +- ...dQueryCompilingExpressionVisitorFactory.cs | 22 +- ...lSqlTranslatingExpressionVisitorFactory.cs | 22 +- .../Query/QuerySqlGeneratorDependencies.cs | 33 +- ...elationalCompiledQueryCacheKeyGenerator.cs | 12 +- ...piledQueryCacheKeyGeneratorDependencies.cs | 37 +- .../RelationalEvaluatableExpressionFilter.cs | 14 +- ...EvaluatableExpressionFilterDependencies.cs | 33 +- .../RelationalMemberTranslatorProvider.cs | 18 +- ...nalMemberTranslatorProviderDependencies.cs | 33 +- .../RelationalMethodCallTranslatorProvider.cs | 18 +- ...ethodCallTranslatorProviderDependencies.cs | 33 +- ...lParameterBasedSqlProcessorDependencies.cs | 33 +- ...onalQueryCompilationContextDependencies.cs | 33 +- .../RelationalQueryContextDependencies.cs | 33 +- ...eryTranslationPostprocessorDependencies.cs | 33 +- ...ueryTranslationPreprocessorDependencies.cs | 33 +- ...ranslatingExpressionVisitorDependencies.cs | 33 +- ...yCompilingExpressionVisitorDependencies.cs | 33 +- ...ranslatingExpressionVisitorDependencies.cs | 33 +- .../Query/SqlExpressionFactoryDependencies.cs | 33 +- .../SqlExpressions/ProjectionExpression.cs | 14 +- .../Query/SqlExpressions/SelectExpression.cs | 26 +- .../SqlExpressions/SqlParameterExpression.cs | 14 +- .../Query/SqlExpressions/TableExpression.cs | 14 +- .../QuerySplittingBehavior.cs | 30 +- .../ProviderCodeGeneratorDependencies.cs | 29 +- .../Storage/IParameterNameGeneratorFactory.cs | 10 +- .../Storage/IRawSqlCommandBuilder.cs | 10 +- .../IRelationalCommandBuilderFactory.cs | 10 +- .../Storage/IRelationalConnection.cs | 18 +- .../Storage/IRelationalDatabaseCreator.cs | 10 +- .../IRelationalDatabaseFacadeDependencies.cs | 10 +- .../Storage/IRelationalTransactionFactory.cs | 10 +- .../Storage/IRelationalTransactionManager.cs | 10 +- .../Storage/IRelationalTypeMappingSource.cs | 83 ++- .../IRelationalTypeMappingSourcePlugin.cs | 14 +- .../IRelationalValueBufferFactoryFactory.cs | 10 +- .../Storage/ISqlGenerationHelper.cs | 10 +- .../INamedConnectionStringResolver.cs | 22 +- .../Internal/NamedConnectionStringResolver.cs | 22 +- .../NamedConnectionStringResolverBase.cs | 22 +- .../Storage/Internal/RawSqlCommandBuilder.cs | 20 +- .../ParameterNameGeneratorDependencies.cs | 33 +- .../Storage/ParameterNameGeneratorFactory.cs | 10 +- .../RelationalCommandBuilderDependencies.cs | 33 +- .../RelationalCommandBuilderFactory.cs | 10 +- .../Storage/RelationalConnection.cs | 18 +- .../RelationalConnectionDependencies.cs | 33 +- .../Storage/RelationalDatabase.cs | 10 +- .../Storage/RelationalDatabaseCreator.cs | 30 +- .../RelationalDatabaseCreatorDependencies.cs | 39 +- .../Storage/RelationalDatabaseDependencies.cs | 33 +- .../RelationalExecutionStrategyFactory.cs | 16 +- .../Storage/RelationalSqlGenerationHelper.cs | 10 +- ...lationalSqlGenerationHelperDependencies.cs | 33 +- .../Storage/RelationalTransaction.cs | 12 +- .../Storage/RelationalTransactionFactory.cs | 12 +- ...elationalTransactionFactoryDependencies.cs | 33 +- .../Storage/RelationalTypeMappingSource.cs | 174 +++--- ...RelationalTypeMappingSourceDependencies.cs | 33 +- .../RelationalTypeMappingSourceExtensions.cs | 10 +- ...elationalValueBufferFactoryDependencies.cs | 38 +- ...ypedRelationalValueBufferFactoryFactory.cs | 18 +- .../Update/ColumnModification.cs | 12 +- .../Update/IBatchExecutor.cs | 10 +- .../Update/ICommandBatchPreparer.cs | 10 +- .../IModificationCommandBatchFactory.cs | 10 +- .../Update/IModificationCommandFactory.cs | 10 +- .../Update/IUpdateSqlGenerator.cs | 10 +- .../Update/Internal/BatchExecutor.cs | 22 +- .../Update/Internal/CommandBatchPreparer.cs | 22 +- .../CommandBatchPreparerDependencies.cs | 39 +- .../Internal/IKeyValueIndexFactorySource.cs | 20 +- .../Internal/KeyValueIndexFactorySource.cs | 20 +- .../Internal/ModificationCommandComparer.cs | 20 +- .../Internal/ModificationCommandFactory.cs | 10 +- ...ficationCommandBatchFactoryDependencies.cs | 33 +- .../Update/UpdateSqlGenerator.cs | 84 +-- .../Update/UpdateSqlGeneratorDependencies.cs | 39 +- .../RelationalValueGeneratorSelector.cs | 10 +- ...rNetTopologySuiteMemberTranslatorPlugin.cs | 10 +- ...TopologySuiteMethodCallTranslatorPlugin.cs | 22 +- ...NetTopologySuiteTypeMappingSourcePlugin.cs | 28 +- .../Diagnostics/SqlServerEventId.cs | 130 ++-- .../SqlServerDatabaseFacadeExtensions.cs | 14 +- ...ServerDbContextOptionsBuilderExtensions.cs | 36 +- .../SqlServerDbFunctionsExtensions.cs | 16 +- .../Extensions/SqlServerDbSetExtensions.cs | 78 +-- .../SqlServerMigrationBuilderExtensions.cs | 4 +- .../SqlServerModelBuilderExtensions.cs | 112 ++-- .../Extensions/SqlServerPropertyExtensions.cs | 20 +- .../SqlServerServiceCollectionExtensions.cs | 40 +- .../Internal/SqlServerModelValidator.cs | 20 +- .../SqlServerDbContextOptionsBuilder.cs | 54 +- .../Builders/TemporalPeriodPropertyBuilder.cs | 6 +- .../Metadata/Builders/TemporalTableBuilder.cs | 6 +- .../Builders/TemporalTableBuilder`.cs | 6 +- .../SqlServerConventionSetBuilder.cs | 40 +- .../Internal/SqlServerAnnotationProvider.cs | 20 +- .../SqlServerValueGenerationStrategy.cs | 12 +- .../Internal/SqlServerHistoryRepository.cs | 22 +- .../SqlServerMigrationsAnnotationProvider.cs | 20 +- .../SqlServerMigrationsSqlGenerator.cs | 69 +-- ...SqlServerQueryCompilationContextFactory.cs | 22 +- .../SqlServerRetryingExecutionStrategy.cs | 52 +- .../Storage/Internal/ISqlServerConnection.cs | 22 +- .../Storage/Internal/SqlServerConnection.cs | 22 +- .../Internal/SqlServerDatabaseCreator.cs | 182 +++--- .../SqlServerExecutionStrategyFactory.cs | 22 +- .../Internal/SqlServerSqlGenerationHelper.cs | 20 +- .../Internal/SqlServerTypeMappingSource.cs | 20 +- .../Internal/ISqlServerUpdateSqlGenerator.cs | 20 +- ...qlServerModificationCommandBatchFactory.cs | 22 +- .../Internal/SqlServerUpdateSqlGenerator.cs | 78 ++- .../Internal/ISqlServerValueGeneratorCache.cs | 20 +- .../Internal/SqlServerValueGeneratorCache.cs | 20 +- .../SqlServerValueGeneratorSelector.cs | 22 +- .../Diagnostics/SqliteEventId.cs | 84 ++- .../SqliteDatabaseFacadeExtensions.cs | 12 +- ...SqliteDbContextOptionsBuilderExtensions.cs | 32 +- .../SqliteMigrationBuilderExtensions.cs | 4 +- .../SqliteServiceCollectionExtensions.cs | 38 +- .../Internal/SqliteModelValidator.cs | 20 +- .../Infrastructure/SpatialiteLoader.cs | 10 +- .../SqliteDbContextOptionsBuilder.cs | 14 +- .../Conventions/SqliteConventionSetBuilder.cs | 40 +- .../Internal/SqliteAnnotationProvider.cs | 20 +- .../Internal/SqliteHistoryRepository.cs | 22 +- .../SqliteMigrationsSqlGenerator.cs | 14 +- .../Internal/ISqliteRelationalConnection.cs | 22 +- .../Storage/Internal/SqliteDatabaseCreator.cs | 22 +- .../Internal/SqliteRelationalConnection.cs | 71 ++- .../Internal/SqliteSqlGenerationHelper.cs | 20 +- .../Internal/SqliteTypeMappingSource.cs | 20 +- .../SqliteModificationCommandBatchFactory.cs | 22 +- .../Internal/SqliteUpdateSqlGenerator.cs | 20 +- ...eNetTopologySuiteMemberTranslatorPlugin.cs | 10 +- ...TopologySuiteMethodCallTranslatorPlugin.cs | 22 +- ...NetTopologySuiteTypeMappingSourcePlugin.cs | 22 +- .../ChangeTracking/ArrayStructuralComparer.cs | 6 +- src/EFCore/ChangeTracking/ChangeTracker.cs | 194 +++--- src/EFCore/ChangeTracking/CollectionEntry.cs | 64 +- src/EFCore/ChangeTracking/CollectionEntry`.cs | 34 +- src/EFCore/ChangeTracking/EntityEntry.cs | 108 ++-- .../ChangeTracking/EntityEntryGraphNode.cs | 52 +- src/EFCore/ChangeTracking/EntityEntry`.cs | 12 +- .../IEntityEntryGraphIterator.cs | 12 +- .../ChangeTracking/Internal/ChangeDetector.cs | 22 +- .../Internal/ChangeTrackerFactory.cs | 22 +- .../Internal/EntityEntryGraphIterator.cs | 20 +- .../Internal/EntityGraphAttacher.cs | 22 +- .../Internal/IChangeDetector.cs | 22 +- .../Internal/IChangeTrackerFactory.cs | 22 +- .../Internal/IEntityGraphAttacher.cs | 22 +- .../Internal/IInternalEntityEntryNotifier.cs | 22 +- .../IInternalEntityEntrySubscriber.cs | 20 +- .../ChangeTracking/Internal/IKeyPropagator.cs | 22 +- .../Internal/ILocalViewListener.cs | 22 +- .../Internal/INavigationFixer.cs | 22 +- .../ChangeTracking/Internal/IStateManager.cs | 22 +- .../Internal/IValueGenerationManager.cs | 22 +- .../Internal/InternalEntityEntryNotifier.cs | 22 +- .../Internal/InternalEntityEntrySubscriber.cs | 20 +- .../ChangeTracking/Internal/KeyPropagator.cs | 22 +- .../Internal/LocalViewListener.cs | 22 +- .../Internal/NavigationFixer.cs | 22 +- .../ChangeTracking/Internal/StateManager.cs | 22 +- .../Internal/StateManagerDependencies.cs | 39 +- .../Internal/ValueGenerationManager.cs | 22 +- src/EFCore/ChangeTracking/LocalView.cs | 75 ++- src/EFCore/ChangeTracking/MemberEntry.cs | 32 +- src/EFCore/ChangeTracking/NavigationEntry.cs | 78 +-- src/EFCore/ChangeTracking/PropertyEntry.cs | 12 +- src/EFCore/ChangeTracking/PropertyEntry`.cs | 12 +- src/EFCore/ChangeTracking/PropertyValues.cs | 50 +- src/EFCore/ChangeTracking/ReferenceEntry.cs | 62 +- src/EFCore/ChangeTracking/ReferenceEntry`.cs | 32 +- src/EFCore/ChangeTracking/ValueComparer.cs | 50 +- src/EFCore/ChangeTracking/ValueComparer`.cs | 84 ++- src/EFCore/ChangeTrackingStrategy.cs | 34 +- src/EFCore/DbContext.cs | 518 ++++++++-------- src/EFCore/DbContextId.cs | 44 +- src/EFCore/DbContextOptionsBuilder.cs | 370 ++++++----- src/EFCore/DbContextOptionsBuilder`.cs | 294 +++++---- src/EFCore/DbFunctionsExtensions.cs | 32 +- src/EFCore/DbLoggerCategory.cs | 12 +- src/EFCore/DbSet.cs | 262 ++++---- src/EFCore/DeleteBehavior.cs | 138 ++--- .../EntityFrameworkDesignServicesBuilder.cs | 32 +- .../CSharpRuntimeAnnotationCodeGenerator.cs | 4 +- ...timeAnnotationCodeGeneratorDependencies.cs | 45 +- ...untimeAnnotationCodeGeneratorParameters.cs | 25 +- src/EFCore/Diagnostics/CoreEventId.cs | 574 +++++++++--------- .../Diagnostics/DbContextLoggerOptions.cs | 22 +- src/EFCore/Diagnostics/IDbContextLogger.cs | 8 +- src/EFCore/Diagnostics/IDiagnosticsLogger.cs | 18 +- src/EFCore/Diagnostics/IDiagnosticsLogger`.cs | 21 +- src/EFCore/Diagnostics/IInterceptor.cs | 12 +- .../Diagnostics/IInterceptorAggregator.cs | 14 +- src/EFCore/Diagnostics/IInterceptors.cs | 8 +- src/EFCore/Diagnostics/ILoggingOptions.cs | 14 +- .../Diagnostics/ISaveChangesInterceptor.cs | 36 +- src/EFCore/Diagnostics/InterceptionResult.cs | 14 +- src/EFCore/Diagnostics/InterceptionResult`.cs | 26 +- .../Diagnostics/InterceptorAggregator.cs | 6 +- .../Diagnostics/Internal/DiagnosticsLogger.cs | 22 +- .../Diagnostics/Internal/LoggingOptions.cs | 20 +- .../Diagnostics/SaveChangesInterceptor.cs | 34 +- .../Diagnostics/WarningsConfiguration.cs | 14 +- .../WarningsConfigurationBuilder.cs | 63 +- src/EFCore/EF.cs | 26 +- .../EntityFrameworkQueryableExtensions.cs | 90 +-- ...ityFrameworkServiceCollectionExtensions.cs | 208 +++---- src/EFCore/Extensions/PropertyExtensions.cs | 20 +- src/EFCore/IDbContextFactory.cs | 20 +- .../Infrastructure/AccessorExtensions.cs | 30 +- src/EFCore/Infrastructure/AnnotatableBase.cs | 10 +- src/EFCore/Infrastructure/DatabaseFacade.cs | 122 ++-- .../EntityFrameworkServicesBuilder.cs | 42 +- .../Infrastructure/ExpressionExtensions.cs | 40 +- .../Infrastructure/IConcurrencyDetector.cs | 16 +- .../Infrastructure/ICoreSingletonOptions.cs | 14 +- .../Infrastructure/ICurrentDbContext.cs | 10 +- .../Infrastructure/IDbContextOptions.cs | 20 +- src/EFCore/Infrastructure/IDbSetFinder.cs | 14 +- .../Infrastructure/IModelCacheKeyFactory.cs | 14 +- src/EFCore/Infrastructure/IModelCustomizer.cs | 24 +- .../IModelRuntimeInitializer.cs | 10 +- src/EFCore/Infrastructure/IModelSource.cs | 10 +- src/EFCore/Infrastructure/IModelValidator.cs | 14 +- .../Infrastructure/IResettableService.cs | 10 +- .../Infrastructure/ISingletonOptions.cs | 10 +- .../Infrastructure/IndentedStringBuilder.cs | 10 +- .../Internal/ConcurrencyDetector.cs | 22 +- .../Internal/CoreSingletonOptions.cs | 20 +- .../Internal/CurrentDbContext.cs | 22 +- .../Infrastructure/Internal/DbSetFinder.cs | 20 +- .../Internal/InternalServiceCollectionMap.cs | 14 +- .../Infrastructure/Internal/LazyLoader.cs | 22 +- src/EFCore/Infrastructure/ModelCacheKey.cs | 8 +- .../Infrastructure/ModelCacheKeyFactory.cs | 16 +- .../ModelCacheKeyFactoryDependencies.cs | 33 +- .../ModelCreationDependencies.cs | 22 +- src/EFCore/Infrastructure/ModelCustomizer.cs | 10 +- .../ModelCustomizerDependencies.cs | 33 +- .../Infrastructure/ModelDependencies.cs | 33 +- .../Infrastructure/ModelRuntimeInitializer.cs | 24 +- .../ModelRuntimeInitializerDependencies.cs | 33 +- src/EFCore/Infrastructure/ModelSource.cs | 10 +- .../Infrastructure/ModelSourceDependencies.cs | 33 +- src/EFCore/Infrastructure/ModelValidator.cs | 20 +- .../ModelValidatorDependencies.cs | 37 +- .../Infrastructure/PooledDbContextFactory.cs | 18 +- .../RuntimeModelDependencies.cs | 33 +- .../Infrastructure/ServiceCollectionMap.cs | 18 +- src/EFCore/Internal/DbContextDependencies.cs | 8 +- src/EFCore/Internal/DbContextServices.cs | 22 +- src/EFCore/Internal/DbSetInitializer.cs | 20 +- src/EFCore/Internal/DbSetSource.cs | 20 +- src/EFCore/Internal/EntityFinderSource.cs | 20 +- src/EFCore/Internal/IDbContextDependencies.cs | 22 +- src/EFCore/Internal/IDbContextServices.cs | 22 +- src/EFCore/Internal/IDbSetInitializer.cs | 20 +- src/EFCore/Internal/IDbSetSource.cs | 20 +- src/EFCore/Internal/IEntityFinderSource.cs | 20 +- src/EFCore/Internal/IRegisteredServices.cs | 20 +- .../Internal/ISingletonOptionsInitializer.cs | 20 +- src/EFCore/Internal/RegisteredServices.cs | 20 +- .../Internal/SingletonOptionsInitializer.cs | 20 +- src/EFCore/Internal/TypeFullNameComparer.cs | 10 +- .../Builders/CollectionCollectionBuilder.cs | 12 +- .../Builders/CollectionCollectionBuilder`.cs | 12 +- .../Builders/CollectionNavigationBuilder.cs | 18 +- .../Builders/CollectionNavigationBuilder`.cs | 28 +- .../Metadata/Builders/EntityTypeBuilder.cs | 296 +++++---- .../Metadata/Builders/EntityTypeBuilder`.cs | 236 ++++--- .../Builders/IConventionModelBuilder.cs | 24 +- src/EFCore/Metadata/Builders/IndexBuilder.cs | 12 +- src/EFCore/Metadata/Builders/IndexBuilder`.cs | 12 +- src/EFCore/Metadata/Builders/KeyBuilder.cs | 12 +- src/EFCore/Metadata/Builders/KeyBuilder`.cs | 12 +- .../Metadata/Builders/NavigationBuilder.cs | 20 +- .../Metadata/Builders/NavigationBuilder`.cs | 20 +- .../Builders/OwnedEntityTypeBuilder.cs | 6 +- .../Builders/OwnedEntityTypeBuilder`.cs | 6 +- .../Builders/OwnedNavigationBuilder.cs | 258 ++++---- .../Builders/OwnedNavigationBuilder`.cs | 290 +++++---- .../Metadata/Builders/OwnershipBuilder.cs | 12 +- .../Metadata/Builders/OwnershipBuilder`.cs | 20 +- .../PropertiesConfigurationBuilder.cs | 16 +- .../PropertiesConfigurationBuilder`.cs | 16 +- .../Metadata/Builders/PropertyBuilder.cs | 92 ++- .../Metadata/Builders/PropertyBuilder`.cs | 92 ++- .../Builders/ReferenceCollectionBuilder.cs | 20 +- .../Builders/ReferenceCollectionBuilder`.cs | 42 +- .../Builders/ReferenceNavigationBuilder.cs | 42 +- .../Builders/ReferenceNavigationBuilder`.cs | 70 +-- .../Builders/ReferenceReferenceBuilder.cs | 20 +- .../Builders/ReferenceReferenceBuilder`.cs | 36 +- .../TypeMappingConfigurationBuilder.cs | 16 +- .../TypeMappingConfigurationBuilder`.cs | 16 +- .../Conventions/BackingFieldConvention.cs | 24 +- .../Metadata/Conventions/ConventionSet.cs | 3 +- .../ForeignKeyAttributeConvention.cs | 12 +- .../ForeignKeyPropertyDiscoveryConvention.cs | 20 +- .../Conventions/IConventionContext.cs | 22 +- .../Conventions/IConventionContext`.cs | 22 +- .../Conventions/IModelFinalizedConvention.cs | 6 +- .../Infrastructure/IConventionSetBuilder.cs | 8 +- .../Infrastructure/IConventionSetPlugin.cs | 14 +- .../IProviderConventionSetBuilder.cs | 16 +- .../ProviderConventionSetBuilder.cs | 16 +- ...roviderConventionSetBuilderDependencies.cs | 39 +- .../Conventions/Internal/ConventionContext.cs | 34 +- .../Internal/RuntimeConventionSetBuilder.cs | 24 +- .../Conventions/KeyDiscoveryConvention.cs | 16 +- .../Metadata/IConstructorBindingFactory.cs | 14 +- src/EFCore/Metadata/IConventionEntityType.cs | 264 ++++---- src/EFCore/Metadata/IConventionForeignKey.cs | 14 +- src/EFCore/Metadata/IConventionIndex.cs | 12 +- src/EFCore/Metadata/IConventionKey.cs | 12 +- src/EFCore/Metadata/IConventionModel.cs | 94 ++- src/EFCore/Metadata/IConventionNavigation.cs | 12 +- .../Metadata/IConventionNavigationBase.cs | 12 +- src/EFCore/Metadata/IConventionProperty.cs | 56 +- .../Metadata/IConventionPropertyBase.cs | 54 +- .../Metadata/IConventionServiceProperty.cs | 14 +- .../Metadata/IConventionSkipNavigation.cs | 14 +- src/EFCore/Metadata/IConventionTypeBase.cs | 36 +- src/EFCore/Metadata/IDesignTimeModel.cs | 16 +- src/EFCore/Metadata/IEntityType.cs | 252 ++++---- src/EFCore/Metadata/IModel.cs | 18 +- src/EFCore/Metadata/IMutableEntityType.cs | 268 ++++---- src/EFCore/Metadata/IMutableForeignKey.cs | 14 +- src/EFCore/Metadata/IMutableIndex.cs | 12 +- src/EFCore/Metadata/IMutableKey.cs | 12 +- src/EFCore/Metadata/IMutableModel.cs | 94 ++- src/EFCore/Metadata/IMutableNavigation.cs | 12 +- src/EFCore/Metadata/IMutableNavigationBase.cs | 12 +- src/EFCore/Metadata/IMutableProperty.cs | 56 +- src/EFCore/Metadata/IMutablePropertyBase.cs | 20 +- .../Metadata/IMutableServiceProperty.cs | 14 +- src/EFCore/Metadata/IMutableSkipNavigation.cs | 14 +- src/EFCore/Metadata/IMutableTypeBase.cs | 36 +- .../Metadata/IParameterBindingFactories.cs | 14 +- .../Metadata/IParameterBindingFactory.cs | 12 +- src/EFCore/Metadata/IPropertyBase.cs | 30 +- .../IPropertyParameterBindingFactory.cs | 14 +- src/EFCore/Metadata/IReadOnlyEntityType.cs | 284 ++++----- src/EFCore/Metadata/IReadOnlyModel.cs | 12 +- src/EFCore/Metadata/IReadOnlyProperty.cs | 20 +- src/EFCore/Metadata/IReadOnlyTypeBase.cs | 24 +- .../Internal/ConstructorBindingFactory.cs | 27 +- .../EntityTypeParameterBindingFactory.cs | 22 +- .../Metadata/Internal/IMemberClassifier.cs | 20 +- .../Metadata/Internal/MemberClassifier.cs | 20 +- src/EFCore/Metadata/Internal/Model.cs | 26 +- .../Internal/ParameterBindingFactories.cs | 20 +- .../PropertyParameterBindingFactory.cs | 20 +- .../LazyLoaderParameterBindingFactory.cs | 12 +- ...aderParameterBindingFactoryDependencies.cs | 33 +- src/EFCore/Metadata/RuntimeEntityType.cs | 92 ++- src/EFCore/Metadata/RuntimeModel.cs | 16 +- .../ServiceParameterBindingFactory.cs | 12 +- src/EFCore/Metadata/ValueGenerated.cs | 14 +- src/EFCore/ModelBuilder.cs | 138 +++-- src/EFCore/ModelConfigurationBuilder.cs | 112 ++-- src/EFCore/PropertyAccessMode.cs | 90 ++- .../Query/CompiledQueryCacheKeyGenerator.cs | 10 +- ...piledQueryCacheKeyGeneratorDependencies.cs | 37 +- .../Query/EvaluatableExpressionFilter.cs | 14 +- ...EvaluatableExpressionFilterDependencies.cs | 33 +- src/EFCore/Query/IAsyncQueryProvider.cs | 14 +- .../Query/ICompiledQueryCacheKeyGenerator.cs | 14 +- src/EFCore/Query/IEntityMaterializerSource.cs | 10 +- .../Query/IEvaluatableExpressionFilter.cs | 14 +- .../IEvaluatableExpressionFilterPlugin.cs | 14 +- .../Query/IQueryCompilationContextFactory.cs | 14 +- src/EFCore/Query/IQueryContextFactory.cs | 14 +- .../IQueryTranslationPostprocessorFactory.cs | 14 +- .../IQueryTranslationPreprocessorFactory.cs | 14 +- ...thodTranslatingExpressionVisitorFactory.cs | 14 +- ...dQueryCompilingExpressionVisitorFactory.cs | 14 +- .../Query/Internal/CompiledQueryCache.cs | 20 +- .../Internal/EntityMaterializerSource.cs | 38 +- .../EntityMaterializerSourceDependencies.cs | 33 +- .../Query/Internal/EntityQueryProvider.cs | 22 +- .../Query/Internal/ICompiledQueryCache.cs | 20 +- src/EFCore/Query/Internal/IQueryCompiler.cs | 22 +- .../Query/Internal/NullAsyncQueryProvider.cs | 22 +- .../QueryCompilationContextFactory.cs | 22 +- src/EFCore/Query/Internal/QueryCompiler.cs | 22 +- .../QueryTranslationPostprocessorFactory.cs | 20 +- .../QueryTranslationPreprocessorFactory.cs | 20 +- ...xpansionExtensibilityHelperDependencies.cs | 33 +- src/EFCore/Query/ProjectionMember.cs | 10 +- .../QueryCompilationContextDependencies.cs | 33 +- src/EFCore/Query/QueryContextDependencies.cs | 33 +- ...eryTranslationPostprocessorDependencies.cs | 33 +- .../Query/QueryTranslationPreprocessor.cs | 14 +- ...ueryTranslationPreprocessorDependencies.cs | 33 +- ...yableMethodTranslatingExpressionVisitor.cs | 12 +- ...ranslatingExpressionVisitorDependencies.cs | 33 +- .../ShapedQueryCompilingExpressionVisitor.cs | 14 +- ...yCompilingExpressionVisitorDependencies.cs | 33 +- src/EFCore/QueryTrackingBehavior.cs | 24 +- src/EFCore/Storage/Database.cs | 10 +- src/EFCore/Storage/DatabaseDependencies.cs | 33 +- src/EFCore/Storage/DatabaseProvider.cs | 10 +- .../Storage/DatabaseProviderDependencies.cs | 33 +- .../Storage/ExecutionStrategyDependencies.cs | 33 +- src/EFCore/Storage/IDatabase.cs | 10 +- src/EFCore/Storage/IDatabaseCreator.cs | 24 +- .../Storage/IDatabaseFacadeDependencies.cs | 10 +- src/EFCore/Storage/IDatabaseProvider.cs | 10 +- src/EFCore/Storage/IDbContextTransaction.cs | 40 +- .../Storage/IDbContextTransactionManager.cs | 10 +- src/EFCore/Storage/IExecutionStrategy.cs | 15 +- .../Storage/IExecutionStrategyFactory.cs | 14 +- src/EFCore/Storage/ITypeMappingSource.cs | 58 +- .../Storage/ITypeMappingSourcePlugin.cs | 14 +- .../Internal/DatabaseFacadeDependencies.cs | 22 +- .../Internal/ExecutionStrategyFactory.cs | 22 +- src/EFCore/Storage/TypeMappingSource.cs | 128 ++-- src/EFCore/Storage/TypeMappingSourceBase.cs | 70 +-- .../Storage/TypeMappingSourceDependencies.cs | 33 +- .../BoolToTwoValuesConverter.cs | 12 +- ...faultValueConverterRegistryDependencies.cs | 12 +- .../ValueConversion/GuidToBytesConverter.cs | 24 +- .../IValueConverterSelector.cs | 16 +- .../ValueConversion/NumberToBytesConverter.cs | 24 +- .../Storage/ValueConversion/ValueConverter.cs | 14 +- .../ValueConversion/ValueConverterSelector.cs | 38 +- src/EFCore/Update/IUpdateAdapter.cs | 50 +- src/EFCore/Update/IUpdateAdapterFactory.cs | 16 +- src/EFCore/Update/Internal/UpdateAdapter.cs | 16 +- .../ValueGeneration/HiLoValueGenerator.cs | 18 +- .../ValueGeneration/IValueGeneratorCache.cs | 10 +- .../IValueGeneratorSelector.cs | 10 +- .../SequentialGuidValueGenerator.cs | 16 +- .../TemporaryNumberValueGeneratorFactory.cs | 16 +- src/EFCore/ValueGeneration/ValueGenerator.cs | 16 +- .../ValueGeneration/ValueGeneratorCache.cs | 10 +- .../ValueGeneratorCacheDependencies.cs | 33 +- .../ValueGeneration/ValueGeneratorSelector.cs | 10 +- .../ValueGeneratorSelectorDependencies.cs | 33 +- 574 files changed, 9540 insertions(+), 10791 deletions(-) diff --git a/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs b/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs index 6771101645f..7ced75804ee 100644 --- a/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs +++ b/src/EFCore.Abstractions/ChangeTracking/ObservableCollectionListSource.cs @@ -9,9 +9,9 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Extends and adds an explicit implementation of . - /// + /// Extends and adds an explicit implementation of . + /// + /// /// /// The method is implemented to return an /// implementation that stays in sync with the ObservableCollection. @@ -20,9 +20,9 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking /// This class can be used to implement navigation properties on entities for use in Windows Forms data binding. /// For WPF data binding use an ObservableCollection rather than an instance of this class. /// - /// - /// - /// See Local views of tracked entities in EF Core for more information. + /// + /// See Local views of tracked entities in EF Core for more information. + /// /// /// The type of elements in the collection. public class ObservableCollectionListSource : ObservableCollection, IListSource diff --git a/src/EFCore.Abstractions/Infrastructure/ILazyLoader.cs b/src/EFCore.Abstractions/Infrastructure/ILazyLoader.cs index 1524baa3e60..5ee1920c7ac 100644 --- a/src/EFCore.Abstractions/Infrastructure/ILazyLoader.cs +++ b/src/EFCore.Abstractions/Infrastructure/ILazyLoader.cs @@ -9,19 +9,19 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// A service that can be injected into entities to give them the capability - /// of loading navigation properties automatically the first time they are accessed. - /// + /// A service that can be injected into entities to give them the capability + /// of loading navigation properties automatically the first time they are accessed. + /// + /// /// /// The service lifetime is 'ServiceLifetime.Transient'. This means that each /// entity 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. /// - /// - /// - /// See Lazy loading for more information. + /// + /// See Lazy loading for more information. + /// /// public interface ILazyLoader : IDisposable { diff --git a/src/EFCore.Abstractions/Properties/AbstractionsStrings.Designer.cs b/src/EFCore.Abstractions/Properties/AbstractionsStrings.Designer.cs index 45d990e16fe..edaa108a9f8 100644 --- a/src/EFCore.Abstractions/Properties/AbstractionsStrings.Designer.cs +++ b/src/EFCore.Abstractions/Properties/AbstractionsStrings.Designer.cs @@ -7,14 +7,12 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// String resources used in EF exceptions, etc. - /// - /// - /// These strings are exposed publicly for use by database providers and extensions. - /// It is unusual for application code to need these strings. - /// + /// String resources used in EF exceptions, etc. /// + /// + /// These strings are exposed publicly for use by database providers and extensions. + /// It is unusual for application code to need these strings. + /// public static class AbstractionsStrings { private static readonly ResourceManager _resourceManager @@ -64,4 +62,3 @@ private static string GetString(string name, params string[] formatterNames) } } } - diff --git a/src/EFCore.Cosmos/Diagnostics/CosmosEventId.cs b/src/EFCore.Cosmos/Diagnostics/CosmosEventId.cs index 5e8b429d61e..0b52b8138cb 100644 --- a/src/EFCore.Cosmos/Diagnostics/CosmosEventId.cs +++ b/src/EFCore.Cosmos/Diagnostics/CosmosEventId.cs @@ -7,18 +7,18 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Event IDs for Cosmos events that correspond to messages logged to an - /// and events sent to a . - /// + /// Event IDs for Cosmos events that correspond to messages logged to an + /// and events sent to a . + /// + /// /// /// These IDs are also used with to configure the /// behavior of warnings. /// - /// - /// - /// See Logging, events, and diagnostics, and - /// Accessing Azure Cosmos DB with EF Core for more information. + /// + /// See Logging, events, and diagnostics, and + /// Accessing Azure Cosmos DB with EF Core for more information. + /// /// public static class CosmosEventId { @@ -42,100 +42,100 @@ private enum Id private static readonly string _commandPrefix = DbLoggerCategory.Database.Command.Name + "."; /// - /// - /// A SQL query is going to be executed. - /// + /// A SQL query is going to be executed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ExecutingSqlQuery = new((int)Id.ExecutingSqlQuery, _commandPrefix + Id.ExecutingSqlQuery); /// - /// - /// ReadItem is going to be executed. - /// + /// ReadItem is going to be executed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ExecutingReadItem = new((int)Id.ExecutingReadItem, _commandPrefix + Id.ExecutingReadItem); /// - /// - /// ReadNext was executed. - /// + /// ReadNext was executed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ExecutedReadNext = new((int)Id.ExecutedReadNext, _commandPrefix + Id.ExecutedReadNext); /// - /// - /// ReadItem was executed. - /// + /// ReadItem was executed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ExecutedReadItem = new((int)Id.ExecutedReadItem, _commandPrefix + Id.ExecutedReadItem); /// - /// - /// CreateItem was executed. - /// + /// CreateItem was executed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ExecutedCreateItem = new((int)Id.ExecutedCreateItem, _commandPrefix + Id.ExecutedCreateItem); /// - /// - /// ReplaceItem was executed. - /// + /// ReplaceItem was executed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ExecutedReplaceItem = new((int)Id.ExecutedReplaceItem, _commandPrefix + Id.ExecutedReplaceItem); /// - /// - /// DeleteItem was executed. - /// + /// DeleteItem was executed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ExecutedDeleteItem = new((int)Id.ExecutedDeleteItem, _commandPrefix + Id.ExecutedDeleteItem); } diff --git a/src/EFCore.Cosmos/Extensions/CosmosDatabaseFacadeExtensions.cs b/src/EFCore.Cosmos/Extensions/CosmosDatabaseFacadeExtensions.cs index 641d4407ef7..38eae0d8234 100644 --- a/src/EFCore.Cosmos/Extensions/CosmosDatabaseFacadeExtensions.cs +++ b/src/EFCore.Cosmos/Extensions/CosmosDatabaseFacadeExtensions.cs @@ -44,18 +44,18 @@ private static TService GetService(IInfrastructure d } /// - /// - /// Returns if the database provider currently in use is the Cosmos provider. - /// + /// Returns if the database provider currently in use is the Cosmos provider. + /// + /// /// /// This method can only be used after the has been configured because /// it is only then that the provider is known. This means that this method cannot be used /// in because this is where application code sets the /// provider to use as part of configuring the context. /// - /// - /// - /// See Accessing Azure Cosmos DB with EF Core for more information. + /// + /// See Accessing Azure Cosmos DB with EF Core for more information. + /// /// /// The facade from . /// if the Cosmos provider is being used. diff --git a/src/EFCore.Cosmos/Extensions/CosmosPropertyBuilderExtensions.cs b/src/EFCore.Cosmos/Extensions/CosmosPropertyBuilderExtensions.cs index 8aa7d8daa5d..919c33248ec 100644 --- a/src/EFCore.Cosmos/Extensions/CosmosPropertyBuilderExtensions.cs +++ b/src/EFCore.Cosmos/Extensions/CosmosPropertyBuilderExtensions.cs @@ -21,10 +21,14 @@ public static class CosmosPropertyBuilderExtensions /// Configures the property name that the property is mapped to when targeting Azure Cosmos. /// /// - /// See Modeling entity types and relationships, and - /// Accessing Azure Cosmos DB with EF Core for more information. + /// + /// If an empty string is supplied then the property will not be persisted. + /// + /// + /// See Modeling entity types and relationships, and + /// Accessing Azure Cosmos DB with EF Core for more information. + /// /// - /// If an empty string is supplied then the property will not be persisted. /// The builder for the property being configured. /// The name of the property. /// The same builder instance so that multiple calls can be chained. @@ -57,12 +61,8 @@ public static PropertyBuilder ToJsonProperty( => (PropertyBuilder)ToJsonProperty((PropertyBuilder)propertyBuilder, name); /// - /// - /// Configures the property name that the property is mapped to when targeting Azure Cosmos. - /// - /// - /// If an empty string is supplied then the property will not be persisted. - /// + /// Configures the property name that the property is mapped to when targeting Azure Cosmos. If an empty string is + /// supplied then the property will not be persisted. /// /// /// See Modeling entity types and relationships, and diff --git a/src/EFCore.Cosmos/Extensions/CosmosQueryableExtensions.cs b/src/EFCore.Cosmos/Extensions/CosmosQueryableExtensions.cs index 747721000f6..21ceb6d6fc9 100644 --- a/src/EFCore.Cosmos/Extensions/CosmosQueryableExtensions.cs +++ b/src/EFCore.Cosmos/Extensions/CosmosQueryableExtensions.cs @@ -58,9 +58,9 @@ source.Provider is EntityQueryProvider } /// - /// - /// Creates a LINQ query based on a raw SQL query. - /// + /// Creates a LINQ query based on a raw SQL query. + /// + /// /// /// You can compose on top of the raw SQL query using LINQ operators: /// @@ -71,10 +71,10 @@ source.Provider is EntityQueryProvider /// arguments. Any parameter values you supply will automatically be converted to a Cosmos parameter: /// /// context.Blogs.FromSqlRaw(""SELECT * FROM root c WHERE c["Name"] = {0})", userSuppliedSearchTerm) - /// - /// - /// See Querying data with EF Core, and - /// Accessing Azure Cosmos DB with EF Core for more information. + /// + /// See Querying data with EF Core, and + /// Accessing Azure Cosmos DB with EF Core for more information. + /// /// /// The type of the elements of . /// diff --git a/src/EFCore.Cosmos/Extensions/CosmosServiceCollectionExtensions.cs b/src/EFCore.Cosmos/Extensions/CosmosServiceCollectionExtensions.cs index 750b67ef70e..b937e3587f5 100644 --- a/src/EFCore.Cosmos/Extensions/CosmosServiceCollectionExtensions.cs +++ b/src/EFCore.Cosmos/Extensions/CosmosServiceCollectionExtensions.cs @@ -31,10 +31,10 @@ namespace Microsoft.Extensions.DependencyInjection public static class CosmosServiceCollectionExtensions { /// - /// - /// Registers the given Entity Framework as a service in the - /// and configures it to connect to an Azure Cosmos database. - /// + /// Registers the given Entity Framework as a service in the + /// and configures it to connect to an Azure Cosmos database. + /// + /// /// /// This method is a shortcut for configuring a to use Cosmos. It does not support all options. /// Use and related methods for full control of @@ -52,12 +52,9 @@ public static class CosmosServiceCollectionExtensions /// an optional action to configure the for the context. /// /// - /// See Using DbContext with dependency injection for more information. + /// See Using DbContextOptions, and + /// Accessing Azure Cosmos DB with EF Core for more information. /// - /// - /// - /// See Using DbContextOptions, and - /// Accessing Azure Cosmos DB with EF Core for more information. /// /// The type of context to be registered. /// The to add services to. @@ -79,10 +76,10 @@ public static IServiceCollection AddCosmos( return serviceCollection.AddDbContext( (serviceProvider, options) => - { - optionsAction?.Invoke(options); - options.UseCosmos(connectionString, databaseName, cosmosOptionsAction); - }); + { + optionsAction?.Invoke(options); + options.UseCosmos(connectionString, databaseName, cosmosOptionsAction); + }); } /// @@ -94,14 +91,14 @@ public static IServiceCollection AddCosmos( /// Warning: Do not call this method accidentally. It is much more likely you need /// to call . /// - /// - /// Calling this method is no longer necessary when building most applications, including those that - /// use dependency injection in ASP.NET or elsewhere. - /// It is only needed when building the internal service provider for use with - /// the method. - /// This is not recommend other than for some advanced scenarios. - /// /// + /// + /// Calling this method is no longer necessary when building most applications, including those that + /// use dependency injection in ASP.NET or elsewhere. + /// It is only needed when building the internal service provider for use with + /// the method. + /// This is not recommend other than for some advanced scenarios. + /// /// The to add services to. /// /// The same service collection so that multiple calls can be chained. diff --git a/src/EFCore.Cosmos/Infrastructure/CosmosDbContextOptionsBuilder.cs b/src/EFCore.Cosmos/Infrastructure/CosmosDbContextOptionsBuilder.cs index f71e63d08cf..e6fdbe83eee 100644 --- a/src/EFCore.Cosmos/Infrastructure/CosmosDbContextOptionsBuilder.cs +++ b/src/EFCore.Cosmos/Infrastructure/CosmosDbContextOptionsBuilder.cs @@ -13,18 +13,18 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Allows Cosmos specific configuration to be performed on . - /// + /// Allows Cosmos specific configuration to be performed on . + /// + /// /// /// Instances of this class are returned from a call to /// /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Using DbContextOptions, and - /// Accessing Azure Cosmos DB with EF Core for more information. + /// + /// See Using DbContextOptions, and + /// Accessing Azure Cosmos DB with EF Core for more information. + /// /// public class CosmosDbContextOptionsBuilder : ICosmosDbContextOptionsBuilderInfrastructure { @@ -84,17 +84,17 @@ public virtual CosmosDbContextOptionsBuilder LimitToEndpoint(bool enable = true) => WithOption(e => e.WithLimitToEndpoint(Check.NotNull(enable, nameof(enable)))); /// - /// - /// Configures the context to use a specific factory. - /// + /// Configures the context to use a specific factory. + /// + /// /// /// To avoid multiple instances being created use lambdas: /// /// .HttpClientFactory(static () => new HttpClient()) - /// - /// - /// See Using DbContextOptions, and - /// Accessing Azure Cosmos DB with EF Core for more information. + /// + /// See Using DbContextOptions, and + /// Accessing Azure Cosmos DB with EF Core for more information. + /// /// /// A function that returns an . public virtual CosmosDbContextOptionsBuilder HttpClientFactory(Func? httpClientFactory) diff --git a/src/EFCore.Cosmos/Infrastructure/Internal/CosmosSingletonOptions.cs b/src/EFCore.Cosmos/Infrastructure/Internal/CosmosSingletonOptions.cs index 98e0c98523e..cd4868beeb6 100644 --- a/src/EFCore.Cosmos/Infrastructure/Internal/CosmosSingletonOptions.cs +++ b/src/EFCore.Cosmos/Infrastructure/Internal/CosmosSingletonOptions.cs @@ -12,18 +12,16 @@ namespace Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class CosmosSingletonOptions : ICosmosSingletonOptions { /// diff --git a/src/EFCore.Cosmos/Infrastructure/Internal/ICosmosSingletonOptions.cs b/src/EFCore.Cosmos/Infrastructure/Internal/ICosmosSingletonOptions.cs index 778f5be0db3..c38ed6f56ff 100644 --- a/src/EFCore.Cosmos/Infrastructure/Internal/ICosmosSingletonOptions.cs +++ b/src/EFCore.Cosmos/Infrastructure/Internal/ICosmosSingletonOptions.cs @@ -11,19 +11,17 @@ namespace Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means a single instance of each service is used by many - /// instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means a single instance of each service is used by many + /// instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface ICosmosSingletonOptions : ISingletonOptions { /// diff --git a/src/EFCore.Cosmos/Metadata/Conventions/Internal/CosmosConventionSetBuilder.cs b/src/EFCore.Cosmos/Metadata/Conventions/Internal/CosmosConventionSetBuilder.cs index 362f7f130bd..301d531a543 100644 --- a/src/EFCore.Cosmos/Metadata/Conventions/Internal/CosmosConventionSetBuilder.cs +++ b/src/EFCore.Cosmos/Metadata/Conventions/Internal/CosmosConventionSetBuilder.cs @@ -138,14 +138,11 @@ public override ConventionSet CreateConventionSet() } /// - /// - /// Call this method to build a for Cosmos outside of . - /// - /// - /// Note that it is unusual to use this method. - /// Consider using in the normal way instead. - /// + /// Call this method to build a for Cosmos outside of . /// + /// + /// Note that it is unusual to use this method. Consider using in the normal way instead. + /// /// The convention set. public static ModelBuilder CreateModelBuilder() { diff --git a/src/EFCore.Cosmos/Metadata/Conventions/StoreKeyConvention.cs b/src/EFCore.Cosmos/Metadata/Conventions/StoreKeyConvention.cs index 0c0074aa0a7..88131b56008 100644 --- a/src/EFCore.Cosmos/Metadata/Conventions/StoreKeyConvention.cs +++ b/src/EFCore.Cosmos/Metadata/Conventions/StoreKeyConvention.cs @@ -14,16 +14,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions { /// + /// A convention that adds the 'id' property - a key required by Azure Cosmos. + /// + /// /// - /// A convention that adds the 'id' property - a key required by Azure Cosmos. + /// This convention also adds the '__jObject' containing the JSON object returned by the store. /// /// - /// This convention also adds the '__jObject' containing the JSON object returned by the store. + /// See Model building conventions, and + /// Accessing Azure Cosmos DB with EF Core for more information. /// - /// - /// - /// See Model building conventions, and - /// Accessing Azure Cosmos DB with EF Core for more information. /// public class StoreKeyConvention : IEntityTypeAddedConvention, diff --git a/src/EFCore.Cosmos/Query/Internal/CosmosQueryCompilationContextFactory.cs b/src/EFCore.Cosmos/Query/Internal/CosmosQueryCompilationContextFactory.cs index a481cdf6a49..638b318066c 100644 --- a/src/EFCore.Cosmos/Query/Internal/CosmosQueryCompilationContextFactory.cs +++ b/src/EFCore.Cosmos/Query/Internal/CosmosQueryCompilationContextFactory.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.Cosmos.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class CosmosQueryCompilationContextFactory : IQueryCompilationContextFactory { /// diff --git a/src/EFCore.Cosmos/Query/Internal/CosmosQueryTranslationPostprocessorFactory.cs b/src/EFCore.Cosmos/Query/Internal/CosmosQueryTranslationPostprocessorFactory.cs index b0e93f35230..ff41b3c04b2 100644 --- a/src/EFCore.Cosmos/Query/Internal/CosmosQueryTranslationPostprocessorFactory.cs +++ b/src/EFCore.Cosmos/Query/Internal/CosmosQueryTranslationPostprocessorFactory.cs @@ -7,12 +7,10 @@ namespace Microsoft.EntityFrameworkCore.Cosmos.Query.Internal { /// - /// - /// 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. - /// + /// 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. /// public class CosmosQueryTranslationPostprocessorFactory : IQueryTranslationPostprocessorFactory { diff --git a/src/EFCore.Cosmos/Query/Internal/CosmosQueryTranslationPreprocessorFactory.cs b/src/EFCore.Cosmos/Query/Internal/CosmosQueryTranslationPreprocessorFactory.cs index 108a33dc955..2c262076f50 100644 --- a/src/EFCore.Cosmos/Query/Internal/CosmosQueryTranslationPreprocessorFactory.cs +++ b/src/EFCore.Cosmos/Query/Internal/CosmosQueryTranslationPreprocessorFactory.cs @@ -7,12 +7,10 @@ namespace Microsoft.EntityFrameworkCore.Cosmos.Query.Internal { /// - /// - /// 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. - /// + /// 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. /// public class CosmosQueryTranslationPreprocessorFactory : IQueryTranslationPreprocessorFactory { diff --git a/src/EFCore.Cosmos/Query/Internal/CosmosQueryableMethodTranslatingExpressionVisitorFactory.cs b/src/EFCore.Cosmos/Query/Internal/CosmosQueryableMethodTranslatingExpressionVisitorFactory.cs index ff1139b7398..30a28753441 100644 --- a/src/EFCore.Cosmos/Query/Internal/CosmosQueryableMethodTranslatingExpressionVisitorFactory.cs +++ b/src/EFCore.Cosmos/Query/Internal/CosmosQueryableMethodTranslatingExpressionVisitorFactory.cs @@ -7,12 +7,10 @@ namespace Microsoft.EntityFrameworkCore.Cosmos.Query.Internal { /// - /// - /// 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. - /// + /// 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. /// public class CosmosQueryableMethodTranslatingExpressionVisitorFactory : IQueryableMethodTranslatingExpressionVisitorFactory { diff --git a/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs b/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs index d02a538e0b6..5a6fb2ec568 100644 --- a/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs +++ b/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs @@ -29,19 +29,17 @@ namespace Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class CosmosClientWrapper : ICosmosClientWrapper { /// diff --git a/src/EFCore.Cosmos/Storage/Internal/CosmosDatabaseWrapper.cs b/src/EFCore.Cosmos/Storage/Internal/CosmosDatabaseWrapper.cs index 30256dc3c9e..6584745ead1 100644 --- a/src/EFCore.Cosmos/Storage/Internal/CosmosDatabaseWrapper.cs +++ b/src/EFCore.Cosmos/Storage/Internal/CosmosDatabaseWrapper.cs @@ -23,19 +23,17 @@ namespace Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class CosmosDatabaseWrapper : Database { private readonly Dictionary _documentCollections = new(); diff --git a/src/EFCore.Cosmos/Storage/Internal/CosmosExecutionStrategyFactory.cs b/src/EFCore.Cosmos/Storage/Internal/CosmosExecutionStrategyFactory.cs index 1c6a16c76d9..f4097c5f309 100644 --- a/src/EFCore.Cosmos/Storage/Internal/CosmosExecutionStrategyFactory.cs +++ b/src/EFCore.Cosmos/Storage/Internal/CosmosExecutionStrategyFactory.cs @@ -10,19 +10,17 @@ namespace Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class CosmosExecutionStrategyFactory : IExecutionStrategyFactory { private readonly Func _createExecutionStrategy; diff --git a/src/EFCore.Cosmos/Storage/Internal/ISingletonCosmosClientWrapper.cs b/src/EFCore.Cosmos/Storage/Internal/ISingletonCosmosClientWrapper.cs index a4a8145de13..b5440a3163c 100644 --- a/src/EFCore.Cosmos/Storage/Internal/ISingletonCosmosClientWrapper.cs +++ b/src/EFCore.Cosmos/Storage/Internal/ISingletonCosmosClientWrapper.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means a single instance of each service is used by many - /// instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means a single instance of each service is used by many + /// instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface ISingletonCosmosClientWrapper : IDisposable { /// diff --git a/src/EFCore.Cosmos/Storage/Internal/SingletonCosmosClientWrapper.cs b/src/EFCore.Cosmos/Storage/Internal/SingletonCosmosClientWrapper.cs index 0d624f1ddb3..6a533b346b2 100644 --- a/src/EFCore.Cosmos/Storage/Internal/SingletonCosmosClientWrapper.cs +++ b/src/EFCore.Cosmos/Storage/Internal/SingletonCosmosClientWrapper.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means a single instance of each service is used by many - /// instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means a single instance of each service is used by many + /// instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SingletonCosmosClientWrapper : ISingletonCosmosClientWrapper { private static readonly string _userAgent = " Microsoft.EntityFrameworkCore.Cosmos/" + ProductInfo.GetVersion(); diff --git a/src/EFCore.Design/Design/Internal/DesignTimeConnectionStringResolver.cs b/src/EFCore.Design/Design/Internal/DesignTimeConnectionStringResolver.cs index bd108007970..aed5635a4b2 100644 --- a/src/EFCore.Design/Design/Internal/DesignTimeConnectionStringResolver.cs +++ b/src/EFCore.Design/Design/Internal/DesignTimeConnectionStringResolver.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.Design.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class DesignTimeConnectionStringResolver : NamedConnectionStringResolverBase, IDesignTimeConnectionStringResolver { private readonly Func? _applicationServiceProviderAccessor; diff --git a/src/EFCore.Design/Design/Internal/IDesignTimeConnectionStringResolver.cs b/src/EFCore.Design/Design/Internal/IDesignTimeConnectionStringResolver.cs index b97b2f720d7..0e6267abd64 100644 --- a/src/EFCore.Design/Design/Internal/IDesignTimeConnectionStringResolver.cs +++ b/src/EFCore.Design/Design/Internal/IDesignTimeConnectionStringResolver.cs @@ -6,12 +6,10 @@ namespace Microsoft.EntityFrameworkCore.Design.Internal { /// - /// - /// 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. - /// + /// 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. /// public interface IDesignTimeConnectionStringResolver : INamedConnectionStringResolver { diff --git a/src/EFCore.Design/Design/OperationExecutor.cs b/src/EFCore.Design/Design/OperationExecutor.cs index bc93fc11bb8..3fe55b5e97e 100644 --- a/src/EFCore.Design/Design/OperationExecutor.cs +++ b/src/EFCore.Design/Design/OperationExecutor.cs @@ -15,14 +15,12 @@ namespace Microsoft.EntityFrameworkCore.Design { /// - /// - /// A facade for design-time operations. - /// - /// - /// Use the CreateInstance overloads on and with the - /// nested types to execute operations. - /// + /// A facade for design-time operations. /// + /// + /// Use the CreateInstance overloads on and with the + /// nested types to execute operations. + /// public class OperationExecutor : MarshalByRefObject { private readonly string _projectDir; @@ -41,7 +39,9 @@ public class OperationExecutor : MarshalByRefObject private Assembly? _startupAssembly; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// + /// /// The arguments supported by are: /// targetName--The assembly name of the target project. /// startupTargetName--The assembly name of the startup project. @@ -50,7 +50,7 @@ public class OperationExecutor : MarshalByRefObject /// language--The programming language to be used to generate classes. /// nullable--A value indicating whether nullable reference types are enabled. /// remainingArguments--Extra arguments passed into the operation. - /// + /// /// The . /// The executor arguments. public OperationExecutor(IOperationReportHandler reportHandler, IDictionary args) @@ -144,7 +144,9 @@ private DatabaseOperations DatabaseOperations public class AddMigration : OperationBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. + /// + /// /// The arguments supported by are: /// name--The name of the migration. /// @@ -152,7 +154,7 @@ public class AddMigration : OperationBase /// "Migrations". /// /// contextType--The type to use. - /// + /// /// The operation executor. /// The . /// The operation arguments. @@ -202,10 +204,12 @@ private IDictionary AddMigrationImpl( public class GetContextInfo : OperationBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. + /// + /// /// The arguments supported by are: /// contextType--The type to use. - /// + /// /// The operation executor. /// The . /// The operation arguments. @@ -242,7 +246,9 @@ private IDictionary GetContextInfoImpl(string? contextType) public class UpdateDatabase : OperationBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. + /// + /// /// The arguments supported by are: /// /// targetMigration--The target . If , all migrations will be @@ -254,7 +260,7 @@ public class UpdateDatabase : OperationBase /// . /// /// contextType--The to use. - /// + /// /// The operation executor. /// The . /// The operation arguments. @@ -287,14 +293,16 @@ private void UpdateDatabaseImpl( public class ScriptMigration : OperationBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. + /// + /// /// The arguments supported by are: /// fromMigration--The starting migration. Defaults to . /// toMigration--The ending migration. Defaults to the last migration. /// idempotent--Generate a script that can be used on a database at any migration. /// noTransactions--Don't generate SQL transaction statements. /// contextType--The to use. - /// + /// /// The operation executor. /// The . /// The operation arguments. @@ -348,11 +356,13 @@ private string ScriptMigrationImpl( public class RemoveMigration : OperationBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. + /// + /// /// The arguments supported by are: /// contextType--The to use. /// force--Don't check to see if the migration has been applied to the database. - /// + /// /// The operation executor. /// The . /// The operation arguments. @@ -390,9 +400,11 @@ private IDictionary RemoveMigrationImpl(string? contextType, bool force) public class GetContextTypes : OperationBase { /// - /// Initializes a new instance of the class. - /// No arguments are currently supported by . + /// Initializes a new instance of the class. /// + /// + /// No arguments are currently supported by . + /// /// The operation executor. /// The . /// The operation arguments. @@ -435,7 +447,9 @@ private IEnumerable GetContextTypesImpl() public class GetMigrations : OperationBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. + /// + /// /// The arguments supported by are: /// contextType--The to use. /// @@ -444,7 +458,7 @@ public class GetMigrations : OperationBase /// . /// /// noConnect--Don't connect to the database. - /// + /// /// The operation executor. /// The . /// The operation arguments. @@ -491,12 +505,14 @@ private IEnumerable GetMigrationsImpl( public class OptimizeContext : OperationBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. + /// + /// /// The arguments supported by are: /// outputDir--The directory to put files in. Paths are relative to the project directory. /// modelNamespace--Specify to override the namespace of the generated model. /// contextType--The to use. - /// + /// /// The operation executor. /// The . /// The operation arguments. @@ -526,7 +542,9 @@ private void OptimizeContextImpl(string? outputDir, string? modelNamespace, stri public class ScaffoldContext : OperationBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. + /// + /// /// The arguments supported by are: /// connectionString--The connection string to the database. /// provider--The provider to use. @@ -541,7 +559,7 @@ public class ScaffoldContext : OperationBase /// modelNamespace--Specify to override the namespace of the generated entity types. /// contextNamespace--Specify to override the namespace of the generated DbContext class. /// noPluralize--Don't use the pluralizer. - /// + /// /// The operation executor. /// The . /// The operation arguments. @@ -612,10 +630,12 @@ private IDictionary ScaffoldContextImpl( public class DropDatabase : OperationBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. + /// + /// /// The arguments supported by are: /// contextType--The to use. - /// + /// /// The operation executor. /// The . /// The operation arguments. @@ -643,10 +663,12 @@ private void DropDatabaseImpl(string? contextType) public class ScriptDbContext : OperationBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. + /// + /// /// The arguments supported by are: /// contextType--The to use. - /// + /// /// The operation executor. /// The . /// The operation arguments. diff --git a/src/EFCore.Design/Migrations/Design/CSharpMigrationOperationGeneratorDependencies.cs b/src/EFCore.Design/Migrations/Design/CSharpMigrationOperationGeneratorDependencies.cs index 1a071366a05..36e4ebc3b81 100644 --- a/src/EFCore.Design/Migrations/Design/CSharpMigrationOperationGeneratorDependencies.cs +++ b/src/EFCore.Design/Migrations/Design/CSharpMigrationOperationGeneratorDependencies.cs @@ -15,37 +15,31 @@ namespace Microsoft.EntityFrameworkCore.Migrations.Design /// 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. - /// /// + /// + /// 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. + /// public sealed record CSharpMigrationOperationGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// - /// The C# helper. + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public CSharpMigrationOperationGeneratorDependencies(ICSharpHelper csharpHelper) { diff --git a/src/EFCore.Design/Migrations/Design/CSharpMigrationsGeneratorDependencies.cs b/src/EFCore.Design/Migrations/Design/CSharpMigrationsGeneratorDependencies.cs index 709e641a705..31481ea3585 100644 --- a/src/EFCore.Design/Migrations/Design/CSharpMigrationsGeneratorDependencies.cs +++ b/src/EFCore.Design/Migrations/Design/CSharpMigrationsGeneratorDependencies.cs @@ -14,36 +14,31 @@ namespace Microsoft.EntityFrameworkCore.Migrations.Design /// 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. - /// /// + /// + /// 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. + /// public sealed record CSharpMigrationsGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public CSharpMigrationsGeneratorDependencies( ICSharpHelper csharpHelper, diff --git a/src/EFCore.Design/Migrations/Design/CSharpSnapshotGeneratorDependencies.cs b/src/EFCore.Design/Migrations/Design/CSharpSnapshotGeneratorDependencies.cs index 35802348398..9b303078e2c 100644 --- a/src/EFCore.Design/Migrations/Design/CSharpSnapshotGeneratorDependencies.cs +++ b/src/EFCore.Design/Migrations/Design/CSharpSnapshotGeneratorDependencies.cs @@ -16,36 +16,31 @@ namespace Microsoft.EntityFrameworkCore.Migrations.Design /// 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. - /// /// + /// + /// 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. + /// public sealed record CSharpSnapshotGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public CSharpSnapshotGeneratorDependencies( ICSharpHelper csharpHelper, diff --git a/src/EFCore.Design/Migrations/Design/MigrationsCodeGeneratorDependencies.cs b/src/EFCore.Design/Migrations/Design/MigrationsCodeGeneratorDependencies.cs index 9c0dc3c05b2..e8621528c64 100644 --- a/src/EFCore.Design/Migrations/Design/MigrationsCodeGeneratorDependencies.cs +++ b/src/EFCore.Design/Migrations/Design/MigrationsCodeGeneratorDependencies.cs @@ -15,36 +15,31 @@ namespace Microsoft.EntityFrameworkCore.Migrations.Design /// 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. - /// /// + /// + /// 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. + /// public sealed record MigrationsCodeGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public MigrationsCodeGeneratorDependencies( IRelationalTypeMappingSource relationalTypeMappingSource, diff --git a/src/EFCore.Design/Migrations/Design/MigrationsScaffolderDependencies.cs b/src/EFCore.Design/Migrations/Design/MigrationsScaffolderDependencies.cs index 1b581a8f82f..3f86f6b1fe8 100644 --- a/src/EFCore.Design/Migrations/Design/MigrationsScaffolderDependencies.cs +++ b/src/EFCore.Design/Migrations/Design/MigrationsScaffolderDependencies.cs @@ -18,42 +18,31 @@ namespace Microsoft.EntityFrameworkCore.Migrations.Design /// 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. - /// /// + /// + /// 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. + /// public sealed record MigrationsScaffolderDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public MigrationsScaffolderDependencies( ICurrentDbContext currentContext, diff --git a/src/EFCore.Design/Scaffolding/ModelCodeGeneratorDependencies.cs b/src/EFCore.Design/Scaffolding/ModelCodeGeneratorDependencies.cs index 4ba28328bb2..aafbadeaa5a 100644 --- a/src/EFCore.Design/Scaffolding/ModelCodeGeneratorDependencies.cs +++ b/src/EFCore.Design/Scaffolding/ModelCodeGeneratorDependencies.cs @@ -13,36 +13,31 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding /// 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. - /// /// + /// + /// 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. + /// public sealed record ModelCodeGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ModelCodeGeneratorDependencies() { diff --git a/src/EFCore.InMemory/Diagnostics/InMemoryEventId.cs b/src/EFCore.InMemory/Diagnostics/InMemoryEventId.cs index 69ab58f665d..7533dc97315 100644 --- a/src/EFCore.InMemory/Diagnostics/InMemoryEventId.cs +++ b/src/EFCore.InMemory/Diagnostics/InMemoryEventId.cs @@ -7,18 +7,18 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Event IDs for in-memory events that correspond to messages logged to an - /// and events sent to a . - /// + /// Event IDs for in-memory events that correspond to messages logged to an + /// and events sent to a . + /// + /// /// /// These IDs are also used with to configure the /// behavior of warnings. /// - /// - /// - /// See Logging, events, and diagnostics, and - /// The EF Core in-memory database provider for more information. + /// + /// See Logging, events, and diagnostics, and + /// The EF Core in-memory database provider for more information. + /// /// public static class InMemoryEventId { @@ -40,16 +40,16 @@ private static EventId MakeTransactionId(Id id) => new((int)id, _transactionPrefix + id); /// - /// - /// A transaction operation was requested, but ignored because in-memory does not support transactions. - /// + /// A transaction operation was requested, but ignored because in-memory does not support transactions. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId TransactionIgnoredWarning = MakeTransactionId(Id.TransactionIgnoredWarning); private static readonly string _updatePrefix = DbLoggerCategory.Update.Name + "."; @@ -58,16 +58,16 @@ private static EventId MakeUpdateId(Id id) => new((int)id, _updatePrefix + id); /// - /// - /// Changes were saved to the database. - /// + /// Changes were saved to the database. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ChangesSaved = MakeUpdateId(Id.ChangesSaved); } } diff --git a/src/EFCore.InMemory/Extensions/InMemoryDatabaseFacadeExtensions.cs b/src/EFCore.InMemory/Extensions/InMemoryDatabaseFacadeExtensions.cs index a25ec59a382..bf0c4c02746 100644 --- a/src/EFCore.InMemory/Extensions/InMemoryDatabaseFacadeExtensions.cs +++ b/src/EFCore.InMemory/Extensions/InMemoryDatabaseFacadeExtensions.cs @@ -13,18 +13,18 @@ namespace Microsoft.EntityFrameworkCore public static class InMemoryDatabaseFacadeExtensions { /// - /// - /// Returns if the database provider currently in use is the in-memory provider. - /// + /// Returns if the database provider currently in use is the in-memory provider. + /// + /// /// /// This method can only be used after the has been configured because /// it is only then that the provider is known. This means that this method cannot be used /// in because this is where application code sets the /// provider to use as part of configuring the context. /// - /// - /// - /// See The EF Core in-memory database provider for more information. + /// + /// See The EF Core in-memory database provider for more information. + /// /// /// The facade from . /// if the in-memory database is being used. diff --git a/src/EFCore.InMemory/Extensions/InMemoryServiceCollectionExtensions.cs b/src/EFCore.InMemory/Extensions/InMemoryServiceCollectionExtensions.cs index e3f79cff163..0ac5642e3f2 100644 --- a/src/EFCore.InMemory/Extensions/InMemoryServiceCollectionExtensions.cs +++ b/src/EFCore.InMemory/Extensions/InMemoryServiceCollectionExtensions.cs @@ -26,18 +26,16 @@ namespace Microsoft.Extensions.DependencyInjection public static class InMemoryServiceCollectionExtensions { /// - /// - /// Adds the services required by the in-memory database provider for Entity Framework - /// to an . - /// - /// - /// Calling this method is no longer necessary when building most applications, including those that - /// use dependency injection in ASP.NET or elsewhere. - /// It is only needed when building the internal service provider for use with - /// the method. - /// This is not recommend other than for some advanced scenarios. - /// + /// Adds the services required by the in-memory database provider for Entity Framework + /// to an . /// + /// + /// Calling this method is no longer necessary when building most applications, including those that + /// use dependency injection in ASP.NET or elsewhere. + /// It is only needed when building the internal service provider for use with + /// the method. + /// This is not recommend other than for some advanced scenarios. + /// /// The to add services to. /// /// The same service collection so that multiple calls can be chained. diff --git a/src/EFCore.InMemory/Infrastructure/InMemoryDbContextOptionsBuilder.cs b/src/EFCore.InMemory/Infrastructure/InMemoryDbContextOptionsBuilder.cs index 4b38f56616b..477b533d549 100644 --- a/src/EFCore.InMemory/Infrastructure/InMemoryDbContextOptionsBuilder.cs +++ b/src/EFCore.InMemory/Infrastructure/InMemoryDbContextOptionsBuilder.cs @@ -8,19 +8,19 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Allows in-memory specific configuration to be performed on . - /// + /// Allows in-memory specific configuration to be performed on . + /// + /// /// /// Instances of this class are returned from a call to /// /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Using DbContextOptions, and - /// The EF Core in-memory database provider for more information. + /// + /// See Using DbContextOptions, and + /// The EF Core in-memory database provider for more information. + /// /// public class InMemoryDbContextOptionsBuilder : IInMemoryDbContextOptionsBuilderInfrastructure { @@ -46,9 +46,7 @@ DbContextOptionsBuilder IInMemoryDbContextOptionsBuilderInfrastructure.OptionsBu => OptionsBuilder; /// - /// - /// Enables nullability check for all properties across all entities within the in-memory database. - /// + /// Enables nullability check for all properties across all entities within the in-memory database. /// /// /// See Using DbContextOptions, and diff --git a/src/EFCore.InMemory/Infrastructure/Internal/IInMemorySingletonOptions.cs b/src/EFCore.InMemory/Infrastructure/Internal/IInMemorySingletonOptions.cs index 002c19b29fd..006117e9b50 100644 --- a/src/EFCore.InMemory/Infrastructure/Internal/IInMemorySingletonOptions.cs +++ b/src/EFCore.InMemory/Infrastructure/Internal/IInMemorySingletonOptions.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Infrastructure.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means a single instance of each service is used by many - /// instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means a single instance of each service is used by many + /// instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IInMemorySingletonOptions : ISingletonOptions { /// diff --git a/src/EFCore.InMemory/Infrastructure/Internal/InMemorySingletonOptions.cs b/src/EFCore.InMemory/Infrastructure/Internal/InMemorySingletonOptions.cs index fb05f1746fa..3064956ac68 100644 --- a/src/EFCore.InMemory/Infrastructure/Internal/InMemorySingletonOptions.cs +++ b/src/EFCore.InMemory/Infrastructure/Internal/InMemorySingletonOptions.cs @@ -10,19 +10,17 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Infrastructure.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means a single instance of each service is used by many - /// instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means a single instance of each service is used by many + /// instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class InMemorySingletonOptions : IInMemorySingletonOptions { /// diff --git a/src/EFCore.InMemory/Metadata/Conventions/InMemoryConventionSetBuilder.cs b/src/EFCore.InMemory/Metadata/Conventions/InMemoryConventionSetBuilder.cs index dc9e2b8e4e4..bdcdd8ff90c 100644 --- a/src/EFCore.InMemory/Metadata/Conventions/InMemoryConventionSetBuilder.cs +++ b/src/EFCore.InMemory/Metadata/Conventions/InMemoryConventionSetBuilder.cs @@ -10,9 +10,9 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Metadata.Conventions { /// - /// - /// A builder for building conventions for th in-memory provider. - /// + /// A builder for building conventions for th in-memory provider. + /// + /// /// /// The service lifetime is and multiple registrations /// are allowed. This means that each instance will use its own @@ -20,10 +20,10 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Metadata.Conventions /// The implementations may depend on other services registered with any lifetime. /// The implementations do not need to be thread-safe. /// - /// - /// - /// See Model building conventions, and - /// The EF Core in-memory database provider for more information. + /// + /// See Model building conventions, and + /// The EF Core in-memory database provider for more information. + /// /// public class InMemoryConventionSetBuilder : ProviderConventionSetBuilder { @@ -48,15 +48,13 @@ public override ConventionSet CreateConventionSet() } /// - /// - /// Call this method to build a for the in-memory provider when using - /// the outside of . - /// - /// - /// Note that it is unusual to use this method. - /// Consider using in the normal way instead. - /// + /// Call this method to build a for the in-memory provider when using + /// the outside of . /// + /// + /// Note that it is unusual to use this method. + /// Consider using in the normal way instead. + /// /// The convention set. public static ConventionSet Build() { @@ -66,14 +64,11 @@ public static ConventionSet Build() } /// - /// - /// Call this method to build a for SQLite outside of . - /// - /// - /// Note that it is unusual to use this method. - /// Consider using in the normal way instead. - /// + /// Call this method to build a for SQLite outside of . /// + /// + /// Note that it is unusual to use this method. Consider using in the normal way instead. + /// /// The convention set. public static ModelBuilder CreateModelBuilder() { diff --git a/src/EFCore.InMemory/Query/Internal/InMemoryQueryContextFactory.cs b/src/EFCore.InMemory/Query/Internal/InMemoryQueryContextFactory.cs index c9efe1a39f7..727c0a13962 100644 --- a/src/EFCore.InMemory/Query/Internal/InMemoryQueryContextFactory.cs +++ b/src/EFCore.InMemory/Query/Internal/InMemoryQueryContextFactory.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class InMemoryQueryContextFactory : IQueryContextFactory { private readonly IInMemoryStore _store; diff --git a/src/EFCore.InMemory/Query/Internal/InMemoryQueryableMethodTranslatingExpressionVisitorFactory.cs b/src/EFCore.InMemory/Query/Internal/InMemoryQueryableMethodTranslatingExpressionVisitorFactory.cs index d739b756898..f4343dc0218 100644 --- a/src/EFCore.InMemory/Query/Internal/InMemoryQueryableMethodTranslatingExpressionVisitorFactory.cs +++ b/src/EFCore.InMemory/Query/Internal/InMemoryQueryableMethodTranslatingExpressionVisitorFactory.cs @@ -8,18 +8,16 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class InMemoryQueryableMethodTranslatingExpressionVisitorFactory : IQueryableMethodTranslatingExpressionVisitorFactory { /// diff --git a/src/EFCore.InMemory/Storage/InMemoryDatabaseRoot.cs b/src/EFCore.InMemory/Storage/InMemoryDatabaseRoot.cs index dd3bdcd86e5..62f44716111 100644 --- a/src/EFCore.InMemory/Storage/InMemoryDatabaseRoot.cs +++ b/src/EFCore.InMemory/Storage/InMemoryDatabaseRoot.cs @@ -18,17 +18,15 @@ namespace Microsoft.EntityFrameworkCore.Storage public sealed class InMemoryDatabaseRoot { /// - /// - /// 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. - /// - /// - /// Entity Framework code will set this instance as needed. It should be considered opaque to - /// application code; the type of object may change at any time. - /// + /// 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. /// + /// + /// Entity Framework code will set this instance as needed. It should be considered opaque to + /// application code; the type of object may change at any time. + /// [EntityFrameworkInternal] public object? Instance; } diff --git a/src/EFCore.InMemory/Storage/Internal/IInMemoryDatabase.cs b/src/EFCore.InMemory/Storage/Internal/IInMemoryDatabase.cs index d180e92849b..fe8505f74fb 100644 --- a/src/EFCore.InMemory/Storage/Internal/IInMemoryDatabase.cs +++ b/src/EFCore.InMemory/Storage/Internal/IInMemoryDatabase.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IInMemoryDatabase : IDatabase { /// diff --git a/src/EFCore.InMemory/Storage/Internal/InMemoryDatabase.cs b/src/EFCore.InMemory/Storage/Internal/InMemoryDatabase.cs index e74aad8b174..328ea5c8c7a 100644 --- a/src/EFCore.InMemory/Storage/Internal/InMemoryDatabase.cs +++ b/src/EFCore.InMemory/Storage/Internal/InMemoryDatabase.cs @@ -15,19 +15,17 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class InMemoryDatabase : Database, IInMemoryDatabase { private readonly IInMemoryStore _store; diff --git a/src/EFCore.InMemory/Storage/Internal/InMemoryDatabaseCreator.cs b/src/EFCore.InMemory/Storage/Internal/InMemoryDatabaseCreator.cs index c638a3de214..3b7d0cc7822 100644 --- a/src/EFCore.InMemory/Storage/Internal/InMemoryDatabaseCreator.cs +++ b/src/EFCore.InMemory/Storage/Internal/InMemoryDatabaseCreator.cs @@ -10,19 +10,17 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class InMemoryDatabaseCreator : IDatabaseCreator { private readonly IDatabase _database; diff --git a/src/EFCore.InMemory/Storage/Internal/InMemoryTransactionManager.cs b/src/EFCore.InMemory/Storage/Internal/InMemoryTransactionManager.cs index e94015f8c8a..329bf1d05e3 100644 --- a/src/EFCore.InMemory/Storage/Internal/InMemoryTransactionManager.cs +++ b/src/EFCore.InMemory/Storage/Internal/InMemoryTransactionManager.cs @@ -13,19 +13,17 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class InMemoryTransactionManager : IDbContextTransactionManager, ITransactionEnlistmentManager { private static readonly InMemoryTransaction _stubTransaction = new(); diff --git a/src/EFCore.InMemory/Storage/Internal/InMemoryTypeMappingSource.cs b/src/EFCore.InMemory/Storage/Internal/InMemoryTypeMappingSource.cs index 37d9cd26513..a1d2946cb69 100644 --- a/src/EFCore.InMemory/Storage/Internal/InMemoryTypeMappingSource.cs +++ b/src/EFCore.InMemory/Storage/Internal/InMemoryTypeMappingSource.cs @@ -11,18 +11,16 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class InMemoryTypeMappingSource : TypeMappingSource { /// diff --git a/src/EFCore.InMemory/ValueGeneration/Internal/InMemoryValueGeneratorSelector.cs b/src/EFCore.InMemory/ValueGeneration/Internal/InMemoryValueGeneratorSelector.cs index 3a438f74c6e..6efdefe8eec 100644 --- a/src/EFCore.InMemory/ValueGeneration/Internal/InMemoryValueGeneratorSelector.cs +++ b/src/EFCore.InMemory/ValueGeneration/Internal/InMemoryValueGeneratorSelector.cs @@ -12,19 +12,17 @@ namespace Microsoft.EntityFrameworkCore.InMemory.ValueGeneration.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class InMemoryValueGeneratorSelector : ValueGeneratorSelector { private readonly IInMemoryStore _inMemoryStore; diff --git a/src/EFCore.Proxies/Proxies/Internal/ProxiesConventionSetPlugin.cs b/src/EFCore.Proxies/Proxies/Internal/ProxiesConventionSetPlugin.cs index 819a9c521b1..f990a3b6c52 100644 --- a/src/EFCore.Proxies/Proxies/Internal/ProxiesConventionSetPlugin.cs +++ b/src/EFCore.Proxies/Proxies/Internal/ProxiesConventionSetPlugin.cs @@ -10,20 +10,18 @@ namespace Microsoft.EntityFrameworkCore.Proxies.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means that each instance will use its own - /// set of instances of this service. - /// The implementations may depend on other services registered with any lifetime. - /// The implementations do not need to be thread-safe. - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means that each instance will use its own + /// set of instances of this service. + /// The implementations may depend on other services registered with any lifetime. + /// The implementations do not need to be thread-safe. + /// public class ProxiesConventionSetPlugin : IConventionSetPlugin { private readonly IDbContextOptions _options; diff --git a/src/EFCore.Proxies/ProxiesExtensions.cs b/src/EFCore.Proxies/ProxiesExtensions.cs index 69bcdd4105c..afb3c71d8d7 100644 --- a/src/EFCore.Proxies/ProxiesExtensions.cs +++ b/src/EFCore.Proxies/ProxiesExtensions.cs @@ -17,17 +17,17 @@ namespace Microsoft.EntityFrameworkCore public static class ProxiesExtensions { /// - /// - /// Turns on the creation of change tracking proxies. - /// + /// Turns on the creation of change tracking proxies. + /// + /// /// /// Note that this requires appropriate services to be available in the EF internal service provider. Normally this /// will happen automatically, but if the application is controlling the service provider, then a call to /// may be needed. /// - /// - /// - /// See Notification entities for more information. + /// + /// See Notification entities for more information. + /// /// /// /// The options builder, as passed to @@ -60,17 +60,17 @@ public static DbContextOptionsBuilder UseChangeTrackingProxies( } /// - /// - /// Turns on the creation of change tracking proxies. - /// + /// Turns on the creation of change tracking proxies. + /// + /// /// /// Note that this requires appropriate services to be available in the EF internal service provider. Normally this /// will happen automatically, but if the application is controlling the service provider, then a call to /// may be needed. /// - /// - /// - /// See Notification entities for more information. + /// + /// See Notification entities for more information. + /// /// /// The type. /// @@ -95,17 +95,17 @@ public static DbContextOptionsBuilder UseChangeTrackingProxies - /// - /// Turns on the creation of lazy loading proxies. - /// + /// Turns on the creation of lazy loading proxies. + /// + /// /// /// Note that this requires appropriate services to be available in the EF internal service provider. Normally this /// will happen automatically, but if the application is controlling the service provider, then a call to /// may be needed. /// - /// - /// - /// See Lazy loading for more information. + /// + /// See Lazy loading for more information. + /// /// /// /// The options builder, as passed to @@ -130,17 +130,17 @@ public static DbContextOptionsBuilder UseLazyLoadingProxies( } /// - /// - /// Turns on the creation of lazy loading proxies. - /// + /// Turns on the creation of lazy loading proxies. + /// + /// /// /// Note that this requires appropriate services to be available in the EF internal service provider. Normally this /// will happen automatically, but if the application is controlling the service provider, then a call to /// may be needed. /// - /// - /// - /// See Lazy loading for more information. + /// + /// See Lazy loading for more information. + /// /// /// The type. /// diff --git a/src/EFCore.Proxies/ProxiesServiceCollectionExtensions.cs b/src/EFCore.Proxies/ProxiesServiceCollectionExtensions.cs index 49297c46f19..5abfbad2ed5 100644 --- a/src/EFCore.Proxies/ProxiesServiceCollectionExtensions.cs +++ b/src/EFCore.Proxies/ProxiesServiceCollectionExtensions.cs @@ -16,17 +16,15 @@ namespace Microsoft.Extensions.DependencyInjection public static class ProxiesServiceCollectionExtensions { /// - /// - /// Adds the services required for proxy support in Entity Framework. - /// - /// - /// Calling this method is no longer necessary when building most applications, including those that - /// use dependency injection in ASP.NET or elsewhere. - /// It is only needed when building the internal service provider for use with - /// the method. - /// This is not recommend other than for some advanced scenarios. - /// + /// Adds the services required for proxy support in Entity Framework. /// + /// + /// Calling this method is no longer necessary when building most applications, including those that + /// use dependency injection in ASP.NET or elsewhere. + /// It is only needed when building the internal service provider for use with + /// the method. + /// This is not recommend other than for some advanced scenarios. + /// /// The to add services to. /// /// The same service collection so that multiple calls can be chained. diff --git a/src/EFCore.Relational/Design/AnnotationCodeGenerator.cs b/src/EFCore.Relational/Design/AnnotationCodeGenerator.cs index d2046082ac6..ea830e15f1f 100644 --- a/src/EFCore.Relational/Design/AnnotationCodeGenerator.cs +++ b/src/EFCore.Relational/Design/AnnotationCodeGenerator.cs @@ -18,18 +18,18 @@ namespace Microsoft.EntityFrameworkCore.Design { /// - /// - /// Base class to be used by database providers when implementing an - /// + /// Base class to be used by database providers when implementing an + /// + /// /// /// This implementation returns for all 'IsHandledByConvention' methods and /// for all 'GenerateFluentApi' methods. Providers should override for the /// annotations that they understand. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class AnnotationCodeGenerator : IAnnotationCodeGenerator { @@ -380,14 +380,12 @@ public virtual IReadOnlyList GenerateDataAnnotationAttrib } /// - /// - /// Checks if the given is handled by convention when - /// applied to the given . - /// - /// - /// The default implementation always returns . - /// + /// Checks if the given is handled by convention when + /// applied to the given . /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// @@ -403,14 +401,12 @@ protected virtual bool IsHandledByConvention(IModel model, IAnnotation annotatio } /// - /// - /// Checks if the given is handled by convention when - /// applied to the given . - /// - /// - /// The default implementation always returns . - /// + /// Checks if the given is handled by convention when + /// applied to the given . /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -423,14 +419,12 @@ protected virtual bool IsHandledByConvention(IEntityType entityType, IAnnotation } /// - /// - /// Checks if the given is handled by convention when - /// applied to the given . - /// - /// - /// The default implementation always returns . - /// + /// Checks if the given is handled by convention when + /// applied to the given . /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -443,14 +437,12 @@ protected virtual bool IsHandledByConvention(IKey key, IAnnotation annotation) } /// - /// - /// Checks if the given is handled by convention when - /// applied to the given . - /// - /// - /// The default implementation always returns . - /// + /// Checks if the given is handled by convention when + /// applied to the given . /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -463,14 +455,12 @@ protected virtual bool IsHandledByConvention(IProperty property, IAnnotation ann } /// - /// - /// Checks if the given is handled by convention when - /// applied to the given . - /// - /// - /// The default implementation always returns . - /// + /// Checks if the given is handled by convention when + /// applied to the given . /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -483,14 +473,12 @@ protected virtual bool IsHandledByConvention(IForeignKey foreignKey, IAnnotation } /// - /// - /// Checks if the given is handled by convention when - /// applied to the given . - /// - /// - /// The default implementation always returns . - /// + /// Checks if the given is handled by convention when + /// applied to the given . /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -503,14 +491,12 @@ protected virtual bool IsHandledByConvention(IIndex index, IAnnotation annotatio } /// - /// - /// Returns a fluent API call for the given , or - /// if no fluent API call exists for it. - /// - /// - /// The default implementation always returns . - /// + /// Returns a fluent API call for the given , or + /// if no fluent API call exists for it. /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -523,14 +509,12 @@ protected virtual bool IsHandledByConvention(IIndex index, IAnnotation annotatio } /// - /// - /// Returns a fluent API call for the given , or - /// if no fluent API call exists for it. - /// - /// - /// The default implementation always returns . - /// + /// Returns a fluent API call for the given , or + /// if no fluent API call exists for it. /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -543,14 +527,12 @@ protected virtual bool IsHandledByConvention(IIndex index, IAnnotation annotatio } /// - /// - /// Returns a fluent API call for the given , or - /// if no fluent API call exists for it. - /// - /// - /// The default implementation always returns . - /// + /// Returns a fluent API call for the given , or + /// if no fluent API call exists for it. /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -563,14 +545,12 @@ protected virtual bool IsHandledByConvention(IIndex index, IAnnotation annotatio } /// - /// - /// Returns a fluent API call for the given , or - /// if no fluent API call exists for it. - /// - /// - /// The default implementation always returns . - /// + /// Returns a fluent API call for the given , or + /// if no fluent API call exists for it. /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -583,14 +563,12 @@ protected virtual bool IsHandledByConvention(IIndex index, IAnnotation annotatio } /// - /// - /// Returns a fluent API call for the given , or - /// if no fluent API call exists for it. - /// - /// - /// The default implementation always returns . - /// + /// Returns a fluent API call for the given , or + /// if no fluent API call exists for it. /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -603,14 +581,12 @@ protected virtual bool IsHandledByConvention(IIndex index, IAnnotation annotatio } /// - /// - /// Returns a fluent API call for the given , or - /// if no fluent API call exists for it. - /// - /// - /// The default implementation always returns . - /// + /// Returns a fluent API call for the given , or + /// if no fluent API call exists for it. /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -623,14 +599,12 @@ protected virtual bool IsHandledByConvention(IIndex index, IAnnotation annotatio } /// - /// - /// Returns a fluent API call for the given , or - /// if no fluent API call exists for it. - /// - /// - /// The default implementation always returns . - /// + /// Returns a fluent API call for the given , or + /// if no fluent API call exists for it. /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -643,14 +617,12 @@ protected virtual bool IsHandledByConvention(IIndex index, IAnnotation annotatio } /// - /// - /// Returns a fluent API call for the given , or - /// if no fluent API call exists for it. - /// - /// - /// The default implementation always returns . - /// + /// Returns a fluent API call for the given , or + /// if no fluent API call exists for it. /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -663,14 +635,12 @@ protected virtual bool IsHandledByConvention(IIndex index, IAnnotation annotatio } /// - /// - /// Returns a data annotation attribute code fragment for the given , - /// or if no data annotation exists for it. - /// - /// - /// The default implementation always returns . - /// + /// Returns a data annotation attribute code fragment for the given , + /// or if no data annotation exists for it. /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . @@ -683,14 +653,12 @@ protected virtual bool IsHandledByConvention(IIndex index, IAnnotation annotatio } /// - /// - /// Returns a data annotation attribute code fragment for the given , - /// or if no data annotation exists for it. - /// - /// - /// The default implementation always returns . - /// + /// Returns a data annotation attribute code fragment for the given , + /// or if no data annotation exists for it. /// + /// + /// The default implementation always returns . + /// /// The . /// The . /// . diff --git a/src/EFCore.Relational/Design/AnnotationCodeGeneratorDependencies.cs b/src/EFCore.Relational/Design/AnnotationCodeGeneratorDependencies.cs index 7d455577198..e3b3e7cb1ed 100644 --- a/src/EFCore.Relational/Design/AnnotationCodeGeneratorDependencies.cs +++ b/src/EFCore.Relational/Design/AnnotationCodeGeneratorDependencies.cs @@ -15,36 +15,31 @@ namespace Microsoft.EntityFrameworkCore.Design /// 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. - /// /// + /// + /// 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. + /// public sealed record AnnotationCodeGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public AnnotationCodeGeneratorDependencies( IRelationalTypeMappingSource relationalTypeMappingSource) diff --git a/src/EFCore.Relational/Design/EntityFrameworkRelationalDesignServicesBuilder.cs b/src/EFCore.Relational/Design/EntityFrameworkRelationalDesignServicesBuilder.cs index 7a4f11d9643..bf6a61214d8 100644 --- a/src/EFCore.Relational/Design/EntityFrameworkRelationalDesignServicesBuilder.cs +++ b/src/EFCore.Relational/Design/EntityFrameworkRelationalDesignServicesBuilder.cs @@ -11,9 +11,9 @@ namespace Microsoft.EntityFrameworkCore.Design { /// - /// - /// A builder API designed for database providers to use when implementing . - /// + /// A builder API designed for database providers to use when implementing . + /// + /// /// /// Providers should create an instance of this class, use its methods to register /// services, and then call to fill out the remaining Entity @@ -24,25 +24,23 @@ namespace Microsoft.EntityFrameworkCore.Design /// may register a service with a different scope, but great care must be taken that all its dependencies /// can handle the new scope, and that it does not cause issue for services that depend on it. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class EntityFrameworkRelationalDesignServicesBuilder : EntityFrameworkDesignServicesBuilder { /// - /// - /// 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. - /// - /// - /// This dictionary is exposed for testing and provider-validation only. - /// It should not be used from application code. - /// + /// 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. /// + /// + /// This dictionary is exposed for testing and provider-validation only. + /// It should not be used from application code. + /// [EntityFrameworkInternal] public static readonly IDictionary RelationalServices = new Dictionary diff --git a/src/EFCore.Relational/Design/Internal/RelationalCSharpRuntimeAnnotationCodeGenerator.cs b/src/EFCore.Relational/Design/Internal/RelationalCSharpRuntimeAnnotationCodeGenerator.cs index 99701fbf324..9aa5615796e 100644 --- a/src/EFCore.Relational/Design/Internal/RelationalCSharpRuntimeAnnotationCodeGenerator.cs +++ b/src/EFCore.Relational/Design/Internal/RelationalCSharpRuntimeAnnotationCodeGenerator.cs @@ -14,9 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Design.Internal { /// - /// - /// Base class to be used by relational database providers when implementing an - /// + /// Base class to be used by relational database providers when implementing an /// #pragma warning disable EF1001 // Internal EF Core API usage. public class RelationalCSharpRuntimeAnnotationCodeGenerator : CSharpRuntimeAnnotationCodeGenerator @@ -515,18 +513,13 @@ private void CreateAnnotations( { process( annotatable, - parameters with - { - Annotations = annotatable.GetAnnotations().ToDictionary(a => a.Name, a => a.Value), - IsRuntime = false - }); + parameters with { Annotations = annotatable.GetAnnotations().ToDictionary(a => a.Name, a => a.Value), IsRuntime = false }); process( annotatable, parameters with { - Annotations = annotatable.GetRuntimeAnnotations().ToDictionary(a => a.Name, a => a.Value), - IsRuntime = true + Annotations = annotatable.GetRuntimeAnnotations().ToDictionary(a => a.Name, a => a.Value), IsRuntime = true }); } diff --git a/src/EFCore.Relational/Design/Internal/RelationalCSharpRuntimeAnnotationCodeGeneratorDependencies.cs b/src/EFCore.Relational/Design/Internal/RelationalCSharpRuntimeAnnotationCodeGeneratorDependencies.cs index 235e86c612b..3f759fccee7 100644 --- a/src/EFCore.Relational/Design/Internal/RelationalCSharpRuntimeAnnotationCodeGeneratorDependencies.cs +++ b/src/EFCore.Relational/Design/Internal/RelationalCSharpRuntimeAnnotationCodeGeneratorDependencies.cs @@ -13,36 +13,31 @@ namespace Microsoft.EntityFrameworkCore.Design.Internal /// 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. - /// /// + /// + /// 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. + /// public sealed record RelationalCSharpRuntimeAnnotationCodeGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalCSharpRuntimeAnnotationCodeGeneratorDependencies() { diff --git a/src/EFCore.Relational/Diagnostics/DbCommandInterceptor.cs b/src/EFCore.Relational/Diagnostics/DbCommandInterceptor.cs index 34a69452ef3..90bc6c2ceb5 100644 --- a/src/EFCore.Relational/Diagnostics/DbCommandInterceptor.cs +++ b/src/EFCore.Relational/Diagnostics/DbCommandInterceptor.cs @@ -9,10 +9,8 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Abstract base class for for use when implementing a subset - /// of the interface methods. - /// + /// Abstract base class for for use when implementing a subset + /// of the interface methods. /// /// /// See EF Core interceptors for more information. @@ -42,15 +40,13 @@ public virtual InterceptionResult CommandCreating( => result; /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed creation of a command in - /// . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed creation of a command in + /// . + /// In this case, is the result returned by . + /// /// Contextual information about the command and execution. /// /// The result of the call to . @@ -218,14 +214,12 @@ public virtual ValueTask> NonQueryExecutingAsync( => new(result); /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// @@ -244,14 +238,12 @@ public virtual DbDataReader ReaderExecuted( => result; /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// @@ -270,14 +262,12 @@ public virtual DbDataReader ReaderExecuted( => result; /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// @@ -296,14 +286,12 @@ public virtual int NonQueryExecuted( => result; /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// @@ -325,14 +313,12 @@ public virtual ValueTask ReaderExecutedAsync( => new(result); /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// @@ -354,14 +340,12 @@ public virtual ValueTask ReaderExecutedAsync( => new(result); /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// diff --git a/src/EFCore.Relational/Diagnostics/DbConnectionInterceptor.cs b/src/EFCore.Relational/Diagnostics/DbConnectionInterceptor.cs index b583f4cdd69..dcf47a9cf1c 100644 --- a/src/EFCore.Relational/Diagnostics/DbConnectionInterceptor.cs +++ b/src/EFCore.Relational/Diagnostics/DbConnectionInterceptor.cs @@ -9,10 +9,8 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Abstract base class for for use when implementing a subset - /// of the interface methods. - /// + /// Abstract base class for for use when implementing a subset + /// of the interface methods. /// /// /// See EF Core interceptors for more information. diff --git a/src/EFCore.Relational/Diagnostics/DbTransactionInterceptor.cs b/src/EFCore.Relational/Diagnostics/DbTransactionInterceptor.cs index c12e8ab2248..1886f8506fc 100644 --- a/src/EFCore.Relational/Diagnostics/DbTransactionInterceptor.cs +++ b/src/EFCore.Relational/Diagnostics/DbTransactionInterceptor.cs @@ -10,10 +10,8 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Abstract base class for for use when implementing a subset - /// of the interface methods. - /// + /// Abstract base class for for use when implementing a subset + /// of the interface methods. /// /// /// See EF Core interceptors for more information. @@ -45,14 +43,12 @@ public virtual InterceptionResult TransactionStarting( => result; /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed creation in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed creation in . + /// In this case, is the result returned by . + /// /// The connection. /// Contextual information about connection and transaction. /// @@ -99,16 +95,12 @@ public virtual ValueTask> TransactionStartingA => new(result); /// - /// - /// Called immediately after EF calls - /// - /// . - /// - /// - /// This method is still called if an interceptor suppressed creation in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed creation in . + /// In this case, is the result returned by . + /// /// The connection. /// Contextual information about connection and transaction. /// @@ -131,9 +123,7 @@ public virtual ValueTask TransactionStartedAsync( => new(result); /// - /// - /// Called immediately after is called. - /// + /// Called immediately after is called. /// /// The connection. /// Contextual information about connection and transaction. @@ -153,9 +143,7 @@ public virtual DbTransaction TransactionUsed( => result; /// - /// - /// Called immediately after is called. - /// + /// Called immediately after is called. /// /// The connection. /// Contextual information about connection and transaction. diff --git a/src/EFCore.Relational/Diagnostics/IDbCommandInterceptor.cs b/src/EFCore.Relational/Diagnostics/IDbCommandInterceptor.cs index f375fedca7f..a62c14e5382 100644 --- a/src/EFCore.Relational/Diagnostics/IDbCommandInterceptor.cs +++ b/src/EFCore.Relational/Diagnostics/IDbCommandInterceptor.cs @@ -9,9 +9,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Allows interception of commands sent to a relational database. - /// + /// Allows interception of commands sent to a relational database. + /// + /// /// /// Command interceptors can be used to view, change, or suppress execution of the , and /// to modify the result before it is returned to EF. @@ -28,9 +28,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics /// If both injected and application interceptors are found, then the injected interceptors are run in the /// order that they are resolved from the service provider, and then the application interceptors are run last. /// - /// - /// - /// See EF Core interceptors for more information. + /// + /// See EF Core interceptors for more information. + /// /// public interface IDbCommandInterceptor : IInterceptor { @@ -56,14 +56,12 @@ InterceptionResult CommandCreating( InterceptionResult result); /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed creation of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed creation of a command in . + /// In this case, is the result returned by . + /// /// Contextual information about the command and execution. /// /// The result of the call to . @@ -226,14 +224,12 @@ ValueTask> NonQueryExecutingAsync( CancellationToken cancellationToken = default); /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// @@ -251,14 +247,12 @@ DbDataReader ReaderExecuted( DbDataReader result); /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// @@ -276,14 +270,12 @@ DbDataReader ReaderExecuted( object? result); /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// @@ -301,14 +293,12 @@ int NonQueryExecuted( int result); /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// @@ -329,14 +319,12 @@ ValueTask ReaderExecutedAsync( CancellationToken cancellationToken = default); /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// @@ -357,14 +345,12 @@ ValueTask ReaderExecutedAsync( CancellationToken cancellationToken = default); /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed execution of a command in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed execution of a command in . + /// In this case, is the result returned by . + /// /// The command. /// Contextual information about the command and execution. /// diff --git a/src/EFCore.Relational/Diagnostics/IDbConnectionInterceptor.cs b/src/EFCore.Relational/Diagnostics/IDbConnectionInterceptor.cs index c3aab87c2ee..73170bfc20a 100644 --- a/src/EFCore.Relational/Diagnostics/IDbConnectionInterceptor.cs +++ b/src/EFCore.Relational/Diagnostics/IDbConnectionInterceptor.cs @@ -9,9 +9,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Allows interception of operations on . - /// + /// Allows interception of operations on . + /// + /// /// /// Connection interceptors can be used to view, change, or suppress the operation on , and /// to modify the result before it is returned to EF. @@ -28,9 +28,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics /// If both injected and application interceptors are found, then the injected interceptors are run in the /// order that they are resolved from the service provider, and then the application interceptors are run last. /// - /// - /// - /// See EF Core interceptors for more information. + /// + /// See EF Core interceptors for more information. + /// /// public interface IDbConnectionInterceptor : IInterceptor { diff --git a/src/EFCore.Relational/Diagnostics/IDbTransactionInterceptor.cs b/src/EFCore.Relational/Diagnostics/IDbTransactionInterceptor.cs index 3f87eb78ec0..7fc2afe9416 100644 --- a/src/EFCore.Relational/Diagnostics/IDbTransactionInterceptor.cs +++ b/src/EFCore.Relational/Diagnostics/IDbTransactionInterceptor.cs @@ -10,9 +10,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Allows interception of operations related to a . - /// + /// Allows interception of operations related to a . + /// + /// /// /// Transaction interceptors can be used to view, change, or suppress operations on , and /// to modify the result before it is returned to EF. @@ -29,9 +29,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics /// If both injected and application interceptors are found, then the injected interceptors are run in the /// order that they are resolved from the service provider, and then the application interceptors are run last. /// - /// - /// - /// See EF Core interceptors for more information. + /// + /// See EF Core interceptors for more information. + /// /// public interface IDbTransactionInterceptor : IInterceptor { @@ -59,14 +59,12 @@ InterceptionResult TransactionStarting( InterceptionResult result); /// - /// - /// Called immediately after EF calls . - /// - /// - /// This method is still called if an interceptor suppressed creation in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed creation in . + /// In this case, is the result returned by . + /// /// The connection. /// Contextual information about connection and transaction. /// @@ -111,16 +109,12 @@ ValueTask> TransactionStartingAsync( CancellationToken cancellationToken = default); /// - /// - /// Called immediately after EF calls - /// - /// . - /// - /// - /// This method is still called if an interceptor suppressed creation in . - /// In this case, is the result returned by . - /// + /// Called immediately after EF calls . /// + /// + /// This method is still called if an interceptor suppressed creation in . + /// In this case, is the result returned by . + /// /// The connection. /// Contextual information about connection and transaction. /// @@ -142,9 +136,7 @@ ValueTask TransactionStartedAsync( CancellationToken cancellationToken = default); /// - /// - /// Called immediately after is called. - /// + /// Called immediately after is called. /// /// The connection. /// Contextual information about connection and transaction. @@ -163,9 +155,7 @@ DbTransaction TransactionUsed( DbTransaction result); /// - /// - /// Called immediately after is called. - /// + /// Called immediately after is called. /// /// The connection. /// Contextual information about connection and transaction. diff --git a/src/EFCore.Relational/Diagnostics/RelationalEventId.cs b/src/EFCore.Relational/Diagnostics/RelationalEventId.cs index 6e6fa9cd0e7..e3111c8a8be 100644 --- a/src/EFCore.Relational/Diagnostics/RelationalEventId.cs +++ b/src/EFCore.Relational/Diagnostics/RelationalEventId.cs @@ -10,17 +10,17 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Event IDs for relational events that correspond to messages logged to an - /// and events sent to a . - /// + /// Event IDs for relational events that correspond to messages logged to an + /// and events sent to a . + /// + /// /// /// These IDs are also used with to configure the /// behavior of warnings. /// - /// - /// - /// See Logging, events, and diagnostics for more information. + /// + /// See Logging, events, and diagnostics for more information. + /// /// public static class RelationalEventId { @@ -108,68 +108,68 @@ private static EventId MakeConnectionId(Id id) => new((int)id, _connectionPrefix + id); /// - /// - /// A database connection is opening. - /// + /// A database connection is opening. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ConnectionOpening = MakeConnectionId(Id.ConnectionOpening); /// - /// - /// A database connection has been opened. - /// + /// A database connection has been opened. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ConnectionOpened = MakeConnectionId(Id.ConnectionOpened); /// - /// - /// A database connection is closing. - /// + /// A database connection is closing. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ConnectionClosing = MakeConnectionId(Id.ConnectionClosing); /// - /// - /// A database connection has been closed. - /// + /// A database connection has been closed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ConnectionClosed = MakeConnectionId(Id.ConnectionClosed); /// - /// - /// A error occurred while opening or using a database connection. - /// + /// A error occurred while opening or using a database connection. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ConnectionError = MakeConnectionId(Id.ConnectionError); private static readonly string _sqlPrefix = DbLoggerCategory.Database.Command.Name + "."; @@ -178,68 +178,68 @@ private static EventId MakeCommandId(Id id) => new((int)id, _sqlPrefix + id); /// - /// - /// A is being created. - /// + /// A is being created. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId CommandCreating = MakeCommandId(Id.CommandCreating); /// - /// - /// A has been created. - /// + /// A has been created. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId CommandCreated = MakeCommandId(Id.CommandCreated); /// - /// - /// A database command is executing. - /// + /// A database command is executing. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId CommandExecuting = MakeCommandId(Id.CommandExecuting); /// - /// - /// A database command has been executed. - /// + /// A database command has been executed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId CommandExecuted = MakeCommandId(Id.CommandExecuted); /// - /// - /// An error occurred while a database command was executing. - /// + /// An error occurred while a database command was executing. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId CommandError = MakeCommandId(Id.CommandError); private static readonly string _transactionPrefix = DbLoggerCategory.Database.Transaction.Name + "."; @@ -248,250 +248,250 @@ private static EventId MakeTransactionId(Id id) => new((int)id, _transactionPrefix + id); /// - /// - /// A database transaction has been started. - /// + /// A database transaction has been started. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId TransactionStarted = MakeTransactionId(Id.TransactionStarted); /// - /// - /// A database transaction is starting. - /// + /// A database transaction is starting. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId TransactionStarting = MakeTransactionId(Id.TransactionStarting); /// - /// - /// Entity Framework started using an already existing database transaction. - /// + /// Entity Framework started using an already existing database transaction. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId TransactionUsed = MakeTransactionId(Id.TransactionUsed); /// - /// - /// A database transaction is being committed. - /// + /// A database transaction is being committed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId TransactionCommitting = MakeTransactionId(Id.TransactionCommitting); /// - /// - /// A database transaction has been committed. - /// + /// A database transaction has been committed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId TransactionCommitted = MakeTransactionId(Id.TransactionCommitted); /// - /// - /// A database transaction is being rolled back. - /// + /// A database transaction is being rolled back. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId TransactionRollingBack = MakeTransactionId(Id.TransactionRollingBack); /// - /// - /// A database transaction has been rolled back. - /// + /// A database transaction has been rolled back. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId TransactionRolledBack = MakeTransactionId(Id.TransactionRolledBack); /// - /// - /// A database transaction savepoint is being created. - /// + /// A database transaction savepoint is being created. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId CreatingTransactionSavepoint = MakeTransactionId(Id.CreatingTransactionSavepoint); /// - /// - /// A database transaction savepoint has been created. - /// + /// A database transaction savepoint has been created. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId CreatedTransactionSavepoint = MakeTransactionId(Id.CreatedTransactionSavepoint); /// - /// - /// A database transaction is being rolled back to a savepoint. - /// + /// A database transaction is being rolled back to a savepoint. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId RollingBackToTransactionSavepoint = MakeTransactionId(Id.RollingBackToTransactionSavepoint); /// - /// - /// A database transaction has been rolled back to a savepoint. - /// + /// A database transaction has been rolled back to a savepoint. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId RolledBackToTransactionSavepoint = MakeTransactionId(Id.RolledBackToTransactionSavepoint); /// - /// - /// A database transaction savepoint is being released. - /// + /// A database transaction savepoint is being released. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ReleasingTransactionSavepoint = MakeTransactionId(Id.ReleasingTransactionSavepoint); /// - /// - /// A database transaction savepoint has been released. - /// + /// A database transaction savepoint has been released. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ReleasedTransactionSavepoint = MakeTransactionId(Id.ReleasedTransactionSavepoint); /// - /// - /// A database transaction has been disposed. - /// + /// A database transaction has been disposed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId TransactionDisposed = MakeTransactionId(Id.TransactionDisposed); /// - /// - /// An error has occurred while using. committing, or rolling back a database transaction. - /// + /// An error has occurred while using. committing, or rolling back a database transaction. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId TransactionError = MakeTransactionId(Id.TransactionError); /// - /// - /// An application may have expected an ambient transaction to be used when it was actually ignored. - /// + /// An application may have expected an ambient transaction to be used when it was actually ignored. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId AmbientTransactionWarning = MakeTransactionId(Id.AmbientTransactionWarning); /// - /// - /// Entity Framework enlisted the connection in an ambient transaction. - /// + /// Entity Framework enlisted the connection in an ambient transaction. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId AmbientTransactionEnlisted = MakeTransactionId(Id.AmbientTransactionEnlisted); /// - /// - /// The connection was explicitly enlisted in a transaction. - /// + /// The connection was explicitly enlisted in a transaction. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ExplicitTransactionEnlisted = MakeTransactionId(Id.ExplicitTransactionEnlisted); /// - /// - /// A database data reader has been disposed. - /// + /// A database data reader has been disposed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId DataReaderDisposing = MakeCommandId(Id.DataReaderDisposing); private static readonly string _migrationsPrefix = DbLoggerCategory.Migrations.Name + "."; @@ -500,120 +500,120 @@ private static EventId MakeMigrationsId(Id id) => new((int)id, _migrationsPrefix + id); /// - /// - /// Migrations is using a database connection. - /// + /// Migrations is using a database connection. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId MigrateUsingConnection = MakeMigrationsId(Id.MigrateUsingConnection); /// - /// - /// A migration is being reverted. - /// + /// A migration is being reverted. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId MigrationReverting = MakeMigrationsId(Id.MigrationReverting); /// - /// - /// A migration is being applied. - /// + /// A migration is being applied. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId MigrationApplying = MakeMigrationsId(Id.MigrationApplying); /// - /// - /// Migrations is generating a "down" script. - /// + /// Migrations is generating a "down" script. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId MigrationGeneratingDownScript = MakeMigrationsId(Id.MigrationGeneratingDownScript); /// - /// - /// Migrations is generating an "up" script. - /// + /// Migrations is generating an "up" script. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId MigrationGeneratingUpScript = MakeMigrationsId(Id.MigrationGeneratingUpScript); /// - /// - /// Migrations weren't applied. - /// + /// Migrations weren't applied. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId MigrationsNotApplied = MakeMigrationsId(Id.MigrationsNotApplied); /// - /// - /// Migrations weren't found. - /// + /// Migrations weren't found. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId MigrationsNotFound = MakeMigrationsId(Id.MigrationsNotFound); /// - /// - /// A MigrationAttribute isn't specified on the class. - /// + /// A MigrationAttribute isn't specified on the class. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId MigrationAttributeMissingWarning = MakeMigrationsId(Id.MigrationAttributeMissingWarning); /// - /// - /// Column order was ignored. - /// + /// Column order was ignored. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ColumnOrderIgnoredWarning = MakeMigrationsId(Id.ColumnOrderIgnoredWarning); private static readonly string _queryPrefix = DbLoggerCategory.Query.Name + "."; @@ -622,39 +622,35 @@ private static EventId MakeQueryId(Id id) => new((int)id, _queryPrefix + id); /// - /// - /// A query is using equals comparisons in a possibly unintended way. - /// + /// A query is using equals comparisons in a possibly unintended way. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId QueryPossibleUnintendedUseOfEqualsWarning = MakeQueryId(Id.QueryPossibleUnintendedUseOfEqualsWarning); /// - /// - /// A query is using a possibly throwing aggregate operation in a sub-query. - /// - /// - /// This event is in the category. - /// + /// A query is using a possibly throwing aggregate operation in a sub-query. /// + /// + /// This event is in the category. + /// [Obsolete] public static readonly EventId QueryPossibleExceptionWithAggregateOperatorWarning = MakeQueryId(Id.Obsolete_QueryPossibleExceptionWithAggregateOperatorWarning); /// - /// - /// A query is loading multiple related collections without configuring a . - /// - /// - /// This event is in the category. - /// + /// A query is loading multiple related collections without configuring a . /// + /// + /// This event is in the category. + /// public static readonly EventId MultipleCollectionIncludeWarning = MakeQueryId(Id.MultipleCollectionIncludeWarning); private static readonly string _validationPrefix = DbLoggerCategory.Model.Validation.Name + "."; @@ -663,112 +659,112 @@ private static EventId MakeValidationId(Id id) => new((int)id, _validationPrefix + id); /// - /// - /// A single database default column value has been set on a key column. - /// + /// A single database default column value has been set on a key column. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ModelValidationKeyDefaultValueWarning = MakeValidationId(Id.ModelValidationKeyDefaultValueWarning); /// - /// - /// A bool property is configured with a store-generated default. - /// + /// A bool property is configured with a store-generated default. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId BoolWithDefaultWarning = MakeValidationId(Id.BoolWithDefaultWarning); /// - /// - /// An index specifies properties all of which are not mapped to a column in any table. - /// + /// An index specifies properties all of which are not mapped to a column in any table. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId AllIndexPropertiesNotToMappedToAnyTable = MakeValidationId(Id.AllIndexPropertiesNotToMappedToAnyTable); /// - /// - /// An index specifies properties some of which are mapped and some of which are not mapped to a column in a table. - /// + /// An index specifies properties some of which are mapped and some of which are not mapped to a column in a table. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId IndexPropertiesBothMappedAndNotMappedToTable = MakeValidationId(Id.IndexPropertiesBothMappedAndNotMappedToTable); /// - /// - /// An index specifies properties which map to columns on non-overlapping tables. - /// + /// An index specifies properties which map to columns on non-overlapping tables. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId IndexPropertiesMappedToNonOverlappingTables = MakeValidationId(Id.IndexPropertiesMappedToNonOverlappingTables); /// - /// - /// A foreign key specifies properties which don't map to the related tables. - /// + /// A foreign key specifies properties which don't map to the related tables. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ForeignKeyPropertiesMappedToUnrelatedTables = MakeValidationId(Id.ForeignKeyPropertiesMappedToUnrelatedTables); /// - /// - /// The entity does not have any property with a non-default value to identify whether the entity exists. - /// + /// The entity does not have any property with a non-default value to identify whether the entity exists. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId OptionalDependentWithoutIdentifyingPropertyWarning = MakeValidationId(Id.OptionalDependentWithoutIdentifyingPropertyWarning); /// - /// - /// The configured column orders for a table contains duplicates. - /// + /// The configured column orders for a table contains duplicates. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId DuplicateColumnOrders = MakeValidationId(Id.DuplicateColumnOrders); private static readonly string _updatePrefix = DbLoggerCategory.Update.Name + "."; @@ -777,64 +773,60 @@ private static EventId MakeUpdateId(Id id) => new((int)id, _updatePrefix + id); /// - /// - /// Update commands were batched and are now ready for execution - /// . - /// + /// Update commands were batched and are now ready for execution + /// . + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId BatchReadyForExecution = MakeUpdateId(Id.BatchReadyForExecution); /// - /// - /// Update commands were not batched because there were fewer than - /// . - /// + /// Update commands were not batched because there were fewer than + /// . + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId BatchSmallerThanMinBatchSize = MakeUpdateId(Id.BatchSmallerThanMinBatchSize); /// - /// - /// An error occurred while the batch executor was rolling back the transaction to a savepoint, after an exception occured. - /// - /// - /// This event is in the category. - /// + /// An error occurred while the batch executor was rolling back the transaction to a savepoint, after an exception occured. /// + /// + /// This event is in the category. + /// public static readonly EventId BatchExecutorFailedToRollbackToSavepoint = MakeUpdateId(Id.BatchExecutorFailedToRollbackToSavepoint); /// - /// - /// An error occurred while the batch executor was releasing a transaction savepoint. - /// - /// - /// This event is in the category. - /// + /// An error occurred while the batch executor was releasing a transaction savepoint. /// + /// + /// This event is in the category. + /// public static readonly EventId BatchExecutorFailedToReleaseSavepoint = MakeUpdateId(Id.BatchExecutorFailedToReleaseSavepoint); /// - /// - /// The entity does not have any property with a non-default value to identify whether the entity exists. - /// + /// The entity does not have any property with a non-default value to identify whether the entity exists. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId OptionalDependentWithAllNullPropertiesWarning = MakeUpdateId(Id.OptionalDependentWithAllNullPropertiesWarning); } diff --git a/src/EFCore.Relational/Extensions/RelationalDatabaseFacadeExtensions.cs b/src/EFCore.Relational/Extensions/RelationalDatabaseFacadeExtensions.cs index a588e6865f1..deedc5e965e 100644 --- a/src/EFCore.Relational/Extensions/RelationalDatabaseFacadeExtensions.cs +++ b/src/EFCore.Relational/Extensions/RelationalDatabaseFacadeExtensions.cs @@ -25,17 +25,17 @@ namespace Microsoft.EntityFrameworkCore public static class RelationalDatabaseFacadeExtensions { /// - /// - /// Applies any pending migrations for the context to the database. Will create the database - /// if it does not already exist. - /// + /// Applies any pending migrations for the context to the database. Will create the database + /// if it does not already exist. + /// + /// /// /// Note that this API is mutually exclusive with . EnsureCreated does not use migrations /// to create the database and therefore the database that is created cannot be later updated using migrations. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// /// The for the context. public static void Migrate(this DatabaseFacade databaseFacade) @@ -108,18 +108,18 @@ public static async Task> GetPendingMigrationsAsync( await GetAppliedMigrationsAsync(databaseFacade, cancellationToken).ConfigureAwait(false)); /// - /// - /// Asynchronously applies any pending migrations for the context to the database. Will create the database - /// if it does not already exist. - /// + /// Asynchronously applies any pending migrations for the context to the database. Will create the database + /// if it does not already exist. + /// + /// /// /// Note that this API is mutually exclusive with . /// does not use migrations to create the database and therefore the database /// that is created cannot be later updated using migrations. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// /// The for the context. /// A to observe while waiting for the task to complete. @@ -132,9 +132,9 @@ public static Task MigrateAsync( .MigrateAsync(cancellationToken: cancellationToken); /// - /// - /// Executes the given SQL against the database and returns the number of rows affected. - /// + /// Executes the given SQL against the database and returns the number of rows affected. + /// + /// /// /// Note that this method does not start a transaction. To use this method with /// a transaction, first call or . @@ -159,10 +159,10 @@ public static Task MigrateAsync( /// into this method. Doing so may expose your application to SQL injection attacks. To use the interpolated string syntax, /// consider using to create parameters. /// - /// - /// - /// See Executing raw SQL commands with EF Core - /// for more information. + /// + /// See Executing raw SQL commands with EF Core + /// for more information. + /// /// /// The for the context. /// The SQL to execute. @@ -175,9 +175,9 @@ public static int ExecuteSqlRaw( => ExecuteSqlRaw(databaseFacade, sql, (IEnumerable)parameters); /// - /// - /// Executes the given SQL against the database and returns the number of rows affected. - /// + /// Executes the given SQL against the database and returns the number of rows affected. + /// + /// /// /// Note that this method does not start a transaction. To use this method with /// a transaction, first call or . @@ -197,10 +197,10 @@ public static int ExecuteSqlRaw( /// var userSuppliedSearchTerm = ".NET"; /// context.Database.ExecuteSqlInterpolated($"UPDATE Blogs SET Rank = 50 WHERE Name = {userSuppliedSearchTerm})"); /// - /// - /// - /// See Executing raw SQL commands with EF Core - /// for more information. + /// + /// See Executing raw SQL commands with EF Core + /// for more information. + /// /// /// The for the context. /// The interpolated string representing a SQL query with parameters. @@ -211,9 +211,9 @@ public static int ExecuteSqlInterpolated( => ExecuteSqlRaw(databaseFacade, sql.Format, sql.GetArguments()!); /// - /// - /// Executes the given SQL against the database and returns the number of rows affected. - /// + /// Executes the given SQL against the database and returns the number of rows affected. + /// + /// /// /// Note that this method does not start a transaction. To use this method with /// a transaction, first call or . @@ -238,10 +238,10 @@ public static int ExecuteSqlInterpolated( /// into this method. Doing so may expose your application to SQL injection attacks. To use the interpolated string syntax, /// consider using to create parameters. /// - /// - /// - /// See Executing raw SQL commands with EF Core - /// for more information. + /// + /// See Executing raw SQL commands with EF Core + /// for more information. + /// /// /// The for the context. /// The SQL to execute. @@ -286,9 +286,9 @@ public static int ExecuteSqlRaw( } /// - /// - /// Executes the given SQL against the database and returns the number of rows affected. - /// + /// Executes the given SQL against the database and returns the number of rows affected. + /// + /// /// /// Note that this method does not start a transaction. To use this method with /// a transaction, first call or . @@ -308,10 +308,10 @@ public static int ExecuteSqlRaw( /// var userSuppliedSearchTerm = ".NET"; /// context.Database.ExecuteSqlInterpolatedAsync($"UPDATE Blogs SET Rank = 50 WHERE Name = {userSuppliedSearchTerm})"); /// - /// - /// - /// See Executing raw SQL commands with EF Core - /// for more information. + /// + /// See Executing raw SQL commands with EF Core + /// for more information. + /// /// /// The for the context. /// The interpolated string representing a SQL query with parameters. @@ -327,9 +327,9 @@ public static Task ExecuteSqlInterpolatedAsync( => ExecuteSqlRawAsync(databaseFacade, sql.Format, sql.GetArguments()!, cancellationToken); /// - /// - /// Executes the given SQL against the database and returns the number of rows affected. - /// + /// Executes the given SQL against the database and returns the number of rows affected. + /// + /// /// /// Note that this method does not start a transaction. To use this method with /// a transaction, first call or . @@ -348,10 +348,10 @@ public static Task ExecuteSqlInterpolatedAsync( /// Never pass a concatenated or interpolated string ($"") with non-validated user-provided values /// into this method. Doing so may expose your application to SQL injection attacks. /// - /// - /// - /// See Executing raw SQL commands with EF Core - /// for more information. + /// + /// See Executing raw SQL commands with EF Core + /// for more information. + /// /// /// The for the context. /// The SQL to execute. @@ -367,9 +367,9 @@ public static Task ExecuteSqlRawAsync( => ExecuteSqlRawAsync(databaseFacade, sql, Enumerable.Empty(), cancellationToken); /// - /// - /// Executes the given SQL against the database and returns the number of rows affected. - /// + /// Executes the given SQL against the database and returns the number of rows affected. + /// + /// /// /// Note that this method does not start a transaction. To use this method with /// a transaction, first call or . @@ -394,10 +394,10 @@ public static Task ExecuteSqlRawAsync( /// into this method. Doing so may expose your application to SQL injection attacks. To use the interpolated string syntax, /// consider using to create parameters. /// - /// - /// - /// See Executing raw SQL commands with EF Core - /// for more information. + /// + /// See Executing raw SQL commands with EF Core + /// for more information. + /// /// /// The for the context. /// The SQL to execute. @@ -412,9 +412,9 @@ public static Task ExecuteSqlRawAsync( => ExecuteSqlRawAsync(databaseFacade, sql, (IEnumerable)parameters); /// - /// - /// Executes the given SQL against the database and returns the number of rows affected. - /// + /// Executes the given SQL against the database and returns the number of rows affected. + /// + /// /// /// Note that this method does not start a transaction. To use this method with /// a transaction, first call or . @@ -439,10 +439,10 @@ public static Task ExecuteSqlRawAsync( /// into this method. Doing so may expose your application to SQL injection attacks. To use the interpolated string syntax, /// consider using to create parameters. /// - /// - /// - /// See Executing raw SQL commands with EF Core - /// for more information. + /// + /// See Executing raw SQL commands with EF Core + /// for more information. + /// /// /// The for the context. /// The SQL to execute. @@ -494,18 +494,18 @@ public static async Task ExecuteSqlRawAsync( } /// - /// - /// Gets the underlying ADO.NET for this . - /// + /// Gets the underlying ADO.NET for this . + /// + /// /// /// This connection should not be disposed if it was created by Entity Framework. Connections are created by /// Entity Framework when a connection string rather than a DbConnection object is passed to the 'UseMyProvider' /// method for the database provider in use. Conversely, the application is responsible for disposing a DbConnection /// passed to Entity Framework in 'UseMyProvider'. /// - /// - /// - /// See Connections and connection strings for more information. + /// + /// See Connections and connection strings for more information. + /// /// /// The for the context. /// The @@ -513,18 +513,18 @@ public static DbConnection GetDbConnection(this DatabaseFacade databaseFacade) => GetFacadeDependencies(databaseFacade).RelationalConnection.DbConnection; /// - /// - /// Sets the underlying ADO.NET for this . - /// + /// Sets the underlying ADO.NET for this . + /// + /// /// /// The connection can only be set when the existing connection, if any, is not open. /// /// /// Note that the given connection must be disposed by application code since it was not created by Entity Framework. /// - /// - /// - /// See Connections and connection strings for more information. + /// + /// See Connections and connection strings for more information. + /// /// /// The for the context. /// The connection. @@ -543,15 +543,15 @@ public static void SetDbConnection(this DatabaseFacade databaseFacade, DbConnect => GetFacadeDependencies(databaseFacade).RelationalConnection.ConnectionString; /// + /// Sets the underlying connection string configured for this . + /// + /// /// - /// Sets the underlying connection string configured for this . + /// It may not be possible to change the connection string if existing connection, if any, is open. /// /// - /// It may not be possible to change the connection string if existing connection, if any, is open. + /// See Connections and connection strings for more information. /// - /// - /// - /// See Connections and connection strings for more information. /// /// The for the context. /// The connection string. @@ -620,13 +620,13 @@ public static Task CloseConnectionAsync(this DatabaseFacade databaseFacade) public static IDbContextTransaction BeginTransaction(this DatabaseFacade databaseFacade, IsolationLevel isolationLevel) => ((IDatabaseFacadeDependenciesAccessor)databaseFacade).Dependencies.ExecutionStrategy.Execute( databaseFacade, database => - { - var transactionManager = database.GetTransactionManager(); + { + var transactionManager = database.GetTransactionManager(); - return transactionManager is IRelationalTransactionManager relationalTransactionManager - ? relationalTransactionManager.BeginTransaction(isolationLevel) - : transactionManager.BeginTransaction(); - }, + return transactionManager is IRelationalTransactionManager relationalTransactionManager + ? relationalTransactionManager.BeginTransaction(isolationLevel) + : transactionManager.BeginTransaction(); + }, null); /// @@ -649,13 +649,13 @@ public static Task BeginTransactionAsync( CancellationToken cancellationToken = default) => ((IDatabaseFacadeDependenciesAccessor)databaseFacade).Dependencies.ExecutionStrategy.ExecuteAsync( databaseFacade, (database, ct) => - { - var transactionManager = database.GetTransactionManager(); + { + var transactionManager = database.GetTransactionManager(); - return transactionManager is IRelationalTransactionManager relationalTransactionManager - ? relationalTransactionManager.BeginTransactionAsync(isolationLevel, ct) - : transactionManager.BeginTransactionAsync(ct); - }, null, cancellationToken); + return transactionManager is IRelationalTransactionManager relationalTransactionManager + ? relationalTransactionManager.BeginTransactionAsync(isolationLevel, ct) + : transactionManager.BeginTransactionAsync(ct); + }, null, cancellationToken); /// /// Sets the to be used by database operations on the . @@ -728,9 +728,9 @@ public static Task BeginTransactionAsync( : throw new InvalidOperationException(RelationalStrings.RelationalNotInUse); /// - /// - /// Sets the timeout (in seconds) to use for commands executed with this . - /// + /// Sets the timeout (in seconds) to use for commands executed with this . + /// + /// /// /// If this value is set, then it is used to set whenever Entity Framework creates a /// to execute a query. @@ -746,9 +746,9 @@ public static Task BeginTransactionAsync( /// to also set a command timeout in the connection string. A value set with this API for the command timeout /// will override any value set in the connection string. /// - /// - /// - /// See Connections and connection strings for more information. + /// + /// See Connections and connection strings for more information. + /// /// /// The for the context. /// The timeout to use, in seconds. @@ -756,16 +756,16 @@ public static void SetCommandTimeout(this DatabaseFacade databaseFacade, int? ti => GetFacadeDependencies(databaseFacade).RelationalConnection.CommandTimeout = timeout; /// - /// - /// Sets the timeout to use for commands executed with this . - /// + /// Sets the timeout to use for commands executed with this . + /// + /// /// /// This is a sugar method allowing a to be used to set the value. It delegates to /// . /// - /// - /// - /// See Connections and connection strings for more information. + /// + /// See Connections and connection strings for more information. + /// /// /// The for the context. /// The timeout to use. @@ -791,16 +791,16 @@ public static void SetCommandTimeout(this DatabaseFacade databaseFacade, TimeSpa } /// - /// - /// Returns the timeout (in seconds) set for commands executed with this . - /// + /// Returns the timeout (in seconds) set for commands executed with this . + /// + /// /// /// Note that the command timeout is distinct from the connection timeout, which is commonly /// set on the database connection string. /// - /// - /// - /// See Connections and connection strings for more information. + /// + /// See Connections and connection strings for more information. + /// /// /// The for the context. /// The timeout, in seconds, or null if no timeout has been set. @@ -820,9 +820,7 @@ public static string GenerateCreateScript(this DatabaseFacade databaseFacade) => databaseFacade.GetRelationalService().GenerateCreateScript(); /// - /// - /// Returns if the database provider currently in use is a relational database. - /// + /// Returns if the database provider currently in use is a relational database. /// /// The facade from . /// diff --git a/src/EFCore.Relational/Extensions/RelationalDbFunctionsExtensions.cs b/src/EFCore.Relational/Extensions/RelationalDbFunctionsExtensions.cs index bfa0713e2d7..5c92d273a50 100644 --- a/src/EFCore.Relational/Extensions/RelationalDbFunctionsExtensions.cs +++ b/src/EFCore.Relational/Extensions/RelationalDbFunctionsExtensions.cs @@ -18,17 +18,17 @@ namespace Microsoft.EntityFrameworkCore public static class RelationalDbFunctionsExtensions { /// - /// - /// Explicitly specifies a collation to be used in a LINQ query. Can be used to generate fragments such as - /// WHERE customer.name COLLATE 'de_DE' = 'John Doe'. - /// + /// Explicitly specifies a collation to be used in a LINQ query. Can be used to generate fragments such as + /// WHERE customer.name COLLATE 'de_DE' = 'John Doe'. + /// + /// /// /// The available collations and their names vary across databases, consult your database's documentation for more /// information. /// - /// - /// - /// See Database functions for more information. + /// + /// See Database functions for more information. + /// /// /// The type of the operand on which the collation is being specified. /// The instance. diff --git a/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs b/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs index eed9d50f07d..a9d599958e5 100644 --- a/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs +++ b/src/EFCore.Relational/Extensions/RelationalEntityTypeExtensions.cs @@ -727,57 +727,49 @@ public static IEnumerable GetCheckConstraints(this IEntityType => CheckConstraint.GetCheckConstraints(entityType).Cast(); /// - /// - /// Returns all check constraints declared on the entity type. - /// - /// - /// This method does not return check constraints declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same check constraint more than once. - /// Use to also return check constraints declared on base types. - /// + /// Returns all check constraints declared on the entity type. /// + /// + /// This method does not return check constraints declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same check constraint more than once. + /// Use to also return check constraints declared on base types. + /// /// The entity type to get the check constraints for. public static IEnumerable GetDeclaredCheckConstraints(this IReadOnlyEntityType entityType) => CheckConstraint.GetDeclaredCheckConstraints(entityType); /// - /// - /// Returns all check constraints declared on the entity type. - /// - /// - /// This method does not return check constraints declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same check constraint more than once. - /// Use to also return check constraints declared on base types. - /// + /// Returns all check constraints declared on the entity type. /// + /// + /// This method does not return check constraints declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same check constraint more than once. + /// Use to also return check constraints declared on base types. + /// /// The entity type to get the check constraints for. public static IEnumerable GetDeclaredCheckConstraints(this IMutableEntityType entityType) => CheckConstraint.GetDeclaredCheckConstraints(entityType).Cast(); /// - /// - /// Returns all check constraints declared on the entity type. - /// - /// - /// This method does not return check constraints declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same check constraint more than once. - /// Use to also return check constraints declared on base types. - /// + /// Returns all check constraints declared on the entity type. /// + /// + /// This method does not return check constraints declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same check constraint more than once. + /// Use to also return check constraints declared on base types. + /// /// The entity type to get the check constraints for. public static IEnumerable GetDeclaredCheckConstraints(this IConventionEntityType entityType) => CheckConstraint.GetDeclaredCheckConstraints(entityType).Cast(); /// - /// - /// Returns all check constraints declared on the entity type. - /// - /// - /// This method does not return check constraints declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same check constraint more than once. - /// Use to also return check constraints declared on base types. - /// + /// Returns all check constraints declared on the entity type. /// + /// + /// This method does not return check constraints declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same check constraint more than once. + /// Use to also return check constraints declared on base types. + /// /// The entity type to get the check constraints for. public static IEnumerable GetDeclaredCheckConstraints(this IEntityType entityType) => CheckConstraint.GetDeclaredCheckConstraints(entityType).Cast(); diff --git a/src/EFCore.Relational/Extensions/RelationalPropertyBuilderExtensions.cs b/src/EFCore.Relational/Extensions/RelationalPropertyBuilderExtensions.cs index 2e8e3e9b0d0..3cb7e825557 100644 --- a/src/EFCore.Relational/Extensions/RelationalPropertyBuilderExtensions.cs +++ b/src/EFCore.Relational/Extensions/RelationalPropertyBuilderExtensions.cs @@ -367,18 +367,18 @@ public static bool CanSetIsFixedLength( => propertyBuilder.CanSetAnnotation(RelationalAnnotationNames.IsFixedLength, fixedLength, fromDataAnnotation); /// - /// - /// Configures the default value expression for the column that the property maps to when targeting a - /// relational database. - /// + /// Configures the default value expression for the column that the property maps to when targeting a + /// relational database. + /// + /// /// /// When called with no argument, this method tells EF that a column has a default value constraint of /// some sort without needing to specify exactly what it is. This can be useful when mapping EF to an /// existing database. /// - /// - /// - /// See Database default values for more information. + /// + /// See Database default values for more information. + /// /// /// The builder for the property being configured. /// The same builder instance so that multiple calls can be chained. @@ -413,18 +413,18 @@ public static PropertyBuilder HasDefaultValueSql( } /// - /// - /// Configures the default value expression for the column that the property maps to when targeting a - /// relational database. - /// + /// Configures the default value expression for the column that the property maps to when targeting a + /// relational database. + /// + /// /// /// When called with no argument, this method tells EF that a column has a default value constraint of /// some sort without needing to specify exactly what it is. This can be useful when mapping EF to an /// existing database. /// - /// - /// - /// See Database default values for more information. + /// + /// See Database default values for more information. + /// /// /// The type of the property being configured. /// The builder for the property being configured. @@ -495,17 +495,17 @@ public static bool CanSetDefaultValueSql( fromDataAnnotation); /// - /// - /// Configures the property to map to a computed column when targeting a relational database. - /// + /// Configures the property to map to a computed column when targeting a relational database. + /// + /// /// /// When called with no arguments, this method tells EF that a column is computed without needing to /// specify the actual SQL used to computed it. This can be useful when mapping EF to an existing /// database. /// - /// - /// - /// See Database default values for more information. + /// + /// See Database default values for more information. + /// /// /// The builder for the property being configured. /// The same builder instance so that multiple calls can be chained. @@ -565,17 +565,17 @@ public static PropertyBuilder HasComputedColumnSql( } /// - /// - /// Configures the property to map to a computed column when targeting a relational database. - /// + /// Configures the property to map to a computed column when targeting a relational database. + /// + /// /// /// When called with no arguments, this method tells EF that a column is computed without needing to /// specify the actual SQL used to computed it. This can be useful when mapping EF to an existing /// database. /// - /// - /// - /// See Database default values for more information. + /// + /// See Database default values for more information. + /// /// /// The type of the property being configured. /// The builder for the property being configured. @@ -720,18 +720,18 @@ public static bool CanSetIsStoredComputedColumn( fromDataAnnotation); /// - /// - /// Configures the default value for the column that the property maps - /// to when targeting a relational database. - /// + /// Configures the default value for the column that the property maps + /// to when targeting a relational database. + /// + /// /// /// When called with no argument, this method tells EF that a column has a default /// value constraint of some sort without needing to specify exactly what it is. /// This can be useful when mapping EF to an existing database. /// - /// - /// - /// See Database default values for more information. + /// + /// See Database default values for more information. + /// /// /// The builder for the property being configured. /// The same builder instance so that multiple calls can be chained. @@ -766,18 +766,18 @@ public static PropertyBuilder HasDefaultValue( } /// - /// - /// Configures the default value for the column that the property maps - /// to when targeting a relational database. - /// + /// Configures the default value for the column that the property maps + /// to when targeting a relational database. + /// + /// /// /// When called with no argument, this method tells EF that a column has a default /// value constraint of some sort without needing to specify exactly what it is. /// This can be useful when mapping EF to an existing database. /// - /// - /// - /// See Database default values for more information. + /// + /// See Database default values for more information. + /// /// /// The type of the property being configured. /// The builder for the property being configured. diff --git a/src/EFCore.Relational/Extensions/RelationalPropertyExtensions.cs b/src/EFCore.Relational/Extensions/RelationalPropertyExtensions.cs index ba09a9d4296..504f0689d08 100644 --- a/src/EFCore.Relational/Extensions/RelationalPropertyExtensions.cs +++ b/src/EFCore.Relational/Extensions/RelationalPropertyExtensions.cs @@ -1046,16 +1046,14 @@ public static void SetIsFixedLength(this IMutableProperty property, bool? fixedL => property.FindAnnotation(RelationalAnnotationNames.IsFixedLength)?.GetConfigurationSource(); /// - /// - /// Checks whether the column mapped to the given will be nullable - /// when created in the database. - /// - /// - /// This depends on the property itself and also how it is mapped. For example, - /// derived non-nullable properties in a TPH type hierarchy will be mapped to nullable columns. - /// As well as properties on optional types sharing the same table. - /// - /// + /// Checks whether the column mapped to the given will be nullable + /// when created in the database. + /// + /// + /// This depends on the property itself and also how it is mapped. For example, + /// derived non-nullable properties in a TPH type hierarchy will be mapped to nullable columns. + /// As well as properties on optional types sharing the same table. + /// /// The . /// if the mapped column is nullable; otherwise. public static bool IsColumnNullable(this IReadOnlyProperty property) @@ -1063,16 +1061,14 @@ public static bool IsColumnNullable(this IReadOnlyProperty property) || (property.DeclaringEntityType.BaseType != null && property.DeclaringEntityType.FindDiscriminatorProperty() != null); /// - /// - /// Checks whether the column mapped to the given property will be nullable - /// when created in the database. - /// - /// - /// This depends on the property itself and also how it is mapped. For example, - /// derived non-nullable properties in a TPH type hierarchy will be mapped to nullable columns. - /// As well as properties on optional types sharing the same table. - /// + /// Checks whether the column mapped to the given property will be nullable + /// when created in the database. /// + /// + /// This depends on the property itself and also how it is mapped. For example, + /// derived non-nullable properties in a TPH type hierarchy will be mapped to nullable columns. + /// As well as properties on optional types sharing the same table. + /// /// The property. /// The identifier of the table-like store object containing the column. /// if the mapped column is nullable; otherwise. diff --git a/src/EFCore.Relational/Extensions/RelationalQueryableExtensions.cs b/src/EFCore.Relational/Extensions/RelationalQueryableExtensions.cs index d8becba114b..8c8769722b4 100644 --- a/src/EFCore.Relational/Extensions/RelationalQueryableExtensions.cs +++ b/src/EFCore.Relational/Extensions/RelationalQueryableExtensions.cs @@ -24,9 +24,9 @@ namespace Microsoft.EntityFrameworkCore public static class RelationalQueryableExtensions { /// - /// /// Creates a set up to execute this query. - /// + /// + /// /// /// This is only typically supported by queries generated by Entity Framework Core. /// @@ -41,9 +41,9 @@ public static class RelationalQueryableExtensions /// /// This is only typically supported by queries generated by Entity Framework Core. /// - /// - /// + /// /// See Logging, events, and diagnostics for more information. + /// /// /// The query source. /// The query string for debugging. @@ -60,9 +60,9 @@ public static DbCommand CreateDbCommand(this IQueryable source) } /// - /// /// Creates a LINQ query based on a raw SQL query. - /// + /// + /// /// /// If the database provider supports composing on the supplied SQL, you can compose on top of the raw SQL query using /// LINQ operators: context.Blogs.FromSqlRaw("SELECT * FROM Blogs").OrderBy(b => b.Name). @@ -83,10 +83,10 @@ public static DbCommand CreateDbCommand(this IQueryable source) /// placeholders as above ({0}), you can also use named placeholders directly in the SQL query string: /// /// context.Blogs.FromSqlRaw("SELECT * FROM Blogs WHERE Name = @searchTerm", new SqlParameter("@searchTerm", userSuppliedSearchTerm)) - /// - /// + /// /// See Executing raw SQL commands with EF Core /// for more information. + /// /// /// The type of the elements of . /// @@ -115,9 +115,9 @@ public static IQueryable FromSqlRaw( } /// - /// /// Creates a LINQ query based on an interpolated string representing a SQL query. - /// + /// + /// /// /// If the database provider supports composing on the supplied SQL, you can compose on top of the raw SQL query using /// LINQ operators: @@ -129,10 +129,10 @@ public static IQueryable FromSqlRaw( /// you supply will automatically be converted to a : /// /// context.Blogs.FromSqlInterpolated($"SELECT * FROM Blogs WHERE Name = {userSuppliedSearchTerm}") - /// - /// + /// /// See Executing raw SQL commands with EF Core /// for more information. + /// /// /// The type of the elements of . /// @@ -180,9 +180,9 @@ private static FromSqlQueryRootExpression GenerateFromSqlQueryRoot( } /// - /// /// Returns a new query which is configured to load the collections in the query results in a single database query. - /// + /// + /// /// /// This behavior generally guarantees result consistency in the face of concurrent updates /// (but details may vary based on the database and transaction isolation level in use). @@ -192,9 +192,9 @@ private static FromSqlQueryRootExpression GenerateFromSqlQueryRoot( /// The default query splitting behavior for queries can be controlled by /// . /// - /// - /// + /// /// See EF Core split queries for more information. + /// /// /// The type of entity being queried. /// The source query. @@ -215,9 +215,9 @@ internal static readonly MethodInfo AsSingleQueryMethodInfo = typeof(RelationalQueryableExtensions).GetRequiredDeclaredMethod(nameof(AsSingleQuery)); /// - /// /// Returns a new query which is configured to load the collections in the query results through separate database queries. - /// + /// + /// /// /// This behavior can significantly improve performance when the query loads multiple collections. /// However, since separate queries are used, this can result in inconsistent results when concurrent updates occur. @@ -228,9 +228,9 @@ internal static readonly MethodInfo AsSingleQueryMethodInfo /// The default query splitting behavior for queries can be controlled by /// . /// - /// - /// + /// /// See EF Core split queries for more information. + /// /// /// The type of entity being queried. /// The source query. diff --git a/src/EFCore.Relational/Infrastructure/EntityFrameworkRelationalServicesBuilder.cs b/src/EFCore.Relational/Infrastructure/EntityFrameworkRelationalServicesBuilder.cs index c6b92dce01a..68644142506 100644 --- a/src/EFCore.Relational/Infrastructure/EntityFrameworkRelationalServicesBuilder.cs +++ b/src/EFCore.Relational/Infrastructure/EntityFrameworkRelationalServicesBuilder.cs @@ -21,9 +21,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// A builder API designed for relational database providers to use when registering services. - /// + /// A builder API designed for relational database providers to use when registering services. + /// + /// /// /// Providers should create an instance of this class, use its methods to register /// services, and then call to fill out the remaining Entity @@ -34,25 +34,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// may register a service with a different scope, but great care must be taken that all its dependencies /// can handle the new scope, and that it does not cause issue for services that depend on it. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class EntityFrameworkRelationalServicesBuilder : EntityFrameworkServicesBuilder { /// - /// - /// 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. - /// - /// - /// This dictionary is exposed for testing and provider-validation only. - /// It should not be used from application code. - /// + /// 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. /// + /// + /// This dictionary is exposed for testing and provider-validation only. + /// It should not be used from application code. + /// [EntityFrameworkInternal] public static readonly IDictionary RelationalServices = new Dictionary @@ -92,7 +90,9 @@ public static readonly IDictionary RelationalServi { typeof(IHistoryRepository), new ServiceCharacteristics(ServiceLifetime.Scoped) }, { typeof(INamedConnectionStringResolver), new ServiceCharacteristics(ServiceLifetime.Scoped) }, { typeof(IRelationalConnectionDiagnosticsLogger), new ServiceCharacteristics(ServiceLifetime.Scoped) }, - { typeof(IDiagnosticsLogger), new ServiceCharacteristics(ServiceLifetime.Scoped) }, + { + typeof(IDiagnosticsLogger), new ServiceCharacteristics(ServiceLifetime.Scoped) + }, { typeof(IRelationalCommandDiagnosticsLogger), new ServiceCharacteristics(ServiceLifetime.Scoped) }, { typeof(IDiagnosticsLogger), new ServiceCharacteristics(ServiceLifetime.Scoped) }, { typeof(IInterceptor), new ServiceCharacteristics(ServiceLifetime.Scoped, multipleRegistrations: true) }, @@ -101,8 +101,7 @@ public static readonly IDictionary RelationalServi new ServiceCharacteristics(ServiceLifetime.Singleton, multipleRegistrations: true) }, { - typeof(IMethodCallTranslatorPlugin), - new ServiceCharacteristics(ServiceLifetime.Scoped, multipleRegistrations: true) + typeof(IMethodCallTranslatorPlugin), new ServiceCharacteristics(ServiceLifetime.Scoped, multipleRegistrations: true) }, { typeof(IMemberTranslatorPlugin), new ServiceCharacteristics(ServiceLifetime.Scoped, multipleRegistrations: true) } }; diff --git a/src/EFCore.Relational/Infrastructure/RelationalDbContextOptionsBuilder.cs b/src/EFCore.Relational/Infrastructure/RelationalDbContextOptionsBuilder.cs index 77a5a97d106..d071b6d9ac1 100644 --- a/src/EFCore.Relational/Infrastructure/RelationalDbContextOptionsBuilder.cs +++ b/src/EFCore.Relational/Infrastructure/RelationalDbContextOptionsBuilder.cs @@ -10,16 +10,16 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Allows relational database specific configuration to be performed on . - /// + /// Allows relational database specific configuration to be performed on . + /// + /// /// /// Instances of this class are typically returned from methods that configure the context to use a /// particular relational database provider. /// - /// - /// - /// See Using DbContextOptions for more information. + /// + /// See Using DbContextOptions for more information. + /// /// public abstract class RelationalDbContextOptionsBuilder : IRelationalDbContextOptionsBuilderInfrastructure where TBuilder : RelationalDbContextOptionsBuilder @@ -73,12 +73,18 @@ public virtual TBuilder MinBatchSize(int minBatchSize) /// Configures the wait time (in seconds) before terminating the attempt to execute a command and generating an error. /// /// - /// See Connections and connection strings for more information. - /// - /// - /// This sets the property on the ADO.NET provider being used. - /// An is generated if value is less than 0. - /// Zero (0) typically means no timeout will be applied, consult your ADO.NET provider documentation. + /// + /// This sets the property on the ADO.NET provider being used. + /// + /// + /// An is generated if value is less than 0. + /// + /// + /// Zero (0) typically means no timeout will be applied, consult your ADO.NET provider documentation. + /// + /// + /// See Connections and connection strings for more information. + /// /// /// The time in seconds to wait for the command to execute. /// The same builder instance so that multiple calls can be chained. diff --git a/src/EFCore.Relational/Infrastructure/RelationalModelCustomizer.cs b/src/EFCore.Relational/Infrastructure/RelationalModelCustomizer.cs index 0945fdc3026..d2fe7dbf56b 100644 --- a/src/EFCore.Relational/Infrastructure/RelationalModelCustomizer.cs +++ b/src/EFCore.Relational/Infrastructure/RelationalModelCustomizer.cs @@ -13,15 +13,17 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class RelationalModelCustomizer : ModelCustomizer { diff --git a/src/EFCore.Relational/Infrastructure/RelationalModelDependencies.cs b/src/EFCore.Relational/Infrastructure/RelationalModelDependencies.cs index 6c587433e63..e3db342c990 100644 --- a/src/EFCore.Relational/Infrastructure/RelationalModelDependencies.cs +++ b/src/EFCore.Relational/Infrastructure/RelationalModelDependencies.cs @@ -13,6 +13,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// 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 @@ -27,28 +29,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalModelDependencies { /// - /// - /// Creates the relational model service dependencies. - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalModelDependencies() { diff --git a/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializer.cs b/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializer.cs index ad06ff56599..e52de04073e 100644 --- a/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializer.cs +++ b/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializer.cs @@ -16,15 +16,17 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class RelationalModelRuntimeInitializer : ModelRuntimeInitializer { diff --git a/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializerDependencies.cs b/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializerDependencies.cs index 157eee9c373..100128d34ab 100644 --- a/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializerDependencies.cs +++ b/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializerDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// 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 @@ -29,28 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record RelationalModelRuntimeInitializerDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// 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. - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalModelRuntimeInitializerDependencies( RelationalModelDependencies relationalModelDependencies, diff --git a/src/EFCore.Relational/Infrastructure/RelationalModelValidator.cs b/src/EFCore.Relational/Infrastructure/RelationalModelValidator.cs index 90124645db5..3aa63deec5b 100644 --- a/src/EFCore.Relational/Infrastructure/RelationalModelValidator.cs +++ b/src/EFCore.Relational/Infrastructure/RelationalModelValidator.cs @@ -14,18 +14,18 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// The validator that enforces rules common for all relational providers. - /// + /// The validator that enforces rules common for all relational providers. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class RelationalModelValidator : ModelValidator { @@ -1525,9 +1525,9 @@ protected virtual void ValidateIndexProperties( } } } - + /// - /// Throws an with a message containing provider-specific information, when + /// Throws an with a message containing provider-specific information, when /// available, indicating possible reasons why the property cannot be mapped. /// /// The property CLR type. @@ -1535,7 +1535,7 @@ protected virtual void ValidateIndexProperties( /// The property. protected override void ThrowPropertyNotMappedException( string propertyType, - IConventionEntityType entityType, + IConventionEntityType entityType, IConventionProperty unmappedProperty) { var storeType = unmappedProperty.GetColumnType(); @@ -1548,7 +1548,7 @@ protected override void ThrowPropertyNotMappedException( unmappedProperty.Name, storeType)); } - + base.ThrowPropertyNotMappedException(propertyType, entityType, unmappedProperty); } } diff --git a/src/EFCore.Relational/Infrastructure/RelationalModelValidatorDependencies.cs b/src/EFCore.Relational/Infrastructure/RelationalModelValidatorDependencies.cs index 420166b1617..a98d99194c7 100644 --- a/src/EFCore.Relational/Infrastructure/RelationalModelValidatorDependencies.cs +++ b/src/EFCore.Relational/Infrastructure/RelationalModelValidatorDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// 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 @@ -29,32 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record RelationalModelValidatorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// This type is typically used by database providers (and other extensions). It is generally - /// not used in application code. - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalModelValidatorDependencies( IRelationalTypeMappingSource typeMappingSource) diff --git a/src/EFCore.Relational/Infrastructure/RelationalOptionsExtension.cs b/src/EFCore.Relational/Infrastructure/RelationalOptionsExtension.cs index 73b9fcf0ca8..d0ac88311fb 100644 --- a/src/EFCore.Relational/Infrastructure/RelationalOptionsExtension.cs +++ b/src/EFCore.Relational/Infrastructure/RelationalOptionsExtension.cs @@ -14,18 +14,18 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Represents options managed by the relational database providers. - /// These options are set using . - /// + /// Represents options managed by the relational database providers. + /// These options are set using . + /// + /// /// /// Instances of this class are designed to be immutable. To change an option, call one of the 'With...' /// methods to obtain a new instance with the option changed. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public abstract class RelationalOptionsExtension : IDbContextOptionsExtension { diff --git a/src/EFCore.Relational/Metadata/Builders/DbFunctionBuilder.cs b/src/EFCore.Relational/Metadata/Builders/DbFunctionBuilder.cs index 382d3e11917..95075692084 100644 --- a/src/EFCore.Relational/Metadata/Builders/DbFunctionBuilder.cs +++ b/src/EFCore.Relational/Metadata/Builders/DbFunctionBuilder.cs @@ -92,18 +92,18 @@ public virtual DbFunctionBuilder HasStoreType(string? storeType) } /// + /// Sets a callback that will be invoked to perform custom translation of this + /// function. The callback takes a collection of expressions corresponding to + /// the parameters passed to the function call. The callback should return an + /// expression representing the desired translation. + /// + /// /// - /// Sets a callback that will be invoked to perform custom translation of this - /// function. The callback takes a collection of expressions corresponding to - /// the parameters passed to the function call. The callback should return an - /// expression representing the desired translation. + /// See https://go.microsoft.com/fwlink/?linkid=852477 for more information. /// /// - /// See https://go.microsoft.com/fwlink/?linkid=852477 for more information. + /// See Database functions for more information. /// - /// - /// - /// See Database functions for more information. /// /// The translation to use. /// The same builder instance so that multiple configuration calls can be chained. diff --git a/src/EFCore.Relational/Metadata/Builders/DbFunctionParameterBuilder.cs b/src/EFCore.Relational/Metadata/Builders/DbFunctionParameterBuilder.cs index ae3c5e232e5..83136f8d828 100644 --- a/src/EFCore.Relational/Metadata/Builders/DbFunctionParameterBuilder.cs +++ b/src/EFCore.Relational/Metadata/Builders/DbFunctionParameterBuilder.cs @@ -10,14 +10,12 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a . - /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Provides a simple API for configuring a . /// + /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. + /// public class DbFunctionParameterBuilder : IInfrastructure { /// diff --git a/src/EFCore.Relational/Metadata/Builders/IConventionDbFunctionBuilder.cs b/src/EFCore.Relational/Metadata/Builders/IConventionDbFunctionBuilder.cs index 1eeded3e9df..07297794aee 100644 --- a/src/EFCore.Relational/Metadata/Builders/IConventionDbFunctionBuilder.cs +++ b/src/EFCore.Relational/Metadata/Builders/IConventionDbFunctionBuilder.cs @@ -136,16 +136,14 @@ public interface IConventionDbFunctionBuilder : IConventionAnnotatableBuilder bool CanSetTypeMapping(RelationalTypeMapping? typeMapping, bool fromDataAnnotation = false); /// - /// - /// Sets a callback that will be invoked to perform custom translation of this - /// function. The callback takes a collection of expressions corresponding to - /// the parameters passed to the function call. The callback should return an - /// expression representing the desired translation. - /// - /// - /// See https://go.microsoft.com/fwlink/?linkid=852477 for more information. - /// - /// + /// Sets a callback that will be invoked to perform custom translation of this + /// function. The callback takes a collection of expressions corresponding to + /// the parameters passed to the function call. The callback should return an + /// expression representing the desired translation. + /// + /// + /// See https://go.microsoft.com/fwlink/?linkid=852477 for more information. + /// /// The translation to use. /// Indicates whether the configuration was specified using a data annotation. /// diff --git a/src/EFCore.Relational/Metadata/Builders/TableBuilder.cs b/src/EFCore.Relational/Metadata/Builders/TableBuilder.cs index 32076a6d81a..92e92e9b9f5 100644 --- a/src/EFCore.Relational/Metadata/Builders/TableBuilder.cs +++ b/src/EFCore.Relational/Metadata/Builders/TableBuilder.cs @@ -7,10 +7,8 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. /// public class TableBuilder { diff --git a/src/EFCore.Relational/Metadata/Builders/TableBuilder`.cs b/src/EFCore.Relational/Metadata/Builders/TableBuilder`.cs index 65e6261c1b3..0b5688009ca 100644 --- a/src/EFCore.Relational/Metadata/Builders/TableBuilder`.cs +++ b/src/EFCore.Relational/Metadata/Builders/TableBuilder`.cs @@ -6,10 +6,8 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. /// /// The entity type being configured. public class TableBuilder : TableBuilder diff --git a/src/EFCore.Relational/Metadata/Conventions/Infrastructure/RelationalConventionSetBuilder.cs b/src/EFCore.Relational/Metadata/Conventions/Infrastructure/RelationalConventionSetBuilder.cs index d500b51d8d8..16e868044dd 100644 --- a/src/EFCore.Relational/Metadata/Conventions/Infrastructure/RelationalConventionSetBuilder.cs +++ b/src/EFCore.Relational/Metadata/Conventions/Infrastructure/RelationalConventionSetBuilder.cs @@ -14,22 +14,24 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure /// service. /// /// - /// Database providers should implement this service by inheriting from either - /// this class (for relational providers) or (for non-relational providers). - /// - /// /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// + /// + /// Database providers should implement this service by inheriting from either + /// this class (for relational providers) or (for non-relational providers). + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public abstract class RelationalConventionSetBuilder : ProviderConventionSetBuilder { diff --git a/src/EFCore.Relational/Metadata/Conventions/Infrastructure/RelationalConventionSetBuilderDependencies.cs b/src/EFCore.Relational/Metadata/Conventions/Infrastructure/RelationalConventionSetBuilderDependencies.cs index cad88be039c..fff748dc861 100644 --- a/src/EFCore.Relational/Metadata/Conventions/Infrastructure/RelationalConventionSetBuilderDependencies.cs +++ b/src/EFCore.Relational/Metadata/Conventions/Infrastructure/RelationalConventionSetBuilderDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure /// 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 @@ -29,34 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalConventionSetBuilderDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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 . This means that each - /// 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalConventionSetBuilderDependencies(IRelationalAnnotationProvider relationalAnnotationProvider) { diff --git a/src/EFCore.Relational/Metadata/IRelationalAnnotationProvider.cs b/src/EFCore.Relational/Metadata/IRelationalAnnotationProvider.cs index e6b8a23f34b..2ccc931c0fc 100644 --- a/src/EFCore.Relational/Metadata/IRelationalAnnotationProvider.cs +++ b/src/EFCore.Relational/Metadata/IRelationalAnnotationProvider.cs @@ -8,19 +8,19 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// A service typically implemented by database providers that gives access to annotations - /// used by relational EF Core components on various elements of the . - /// + /// A service typically implemented by database providers that gives access to annotations + /// used by relational EF Core components on various elements of the . + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IRelationalAnnotationProvider { diff --git a/src/EFCore.Relational/Metadata/Internal/InternalDbFunctionParameterBuilder.cs b/src/EFCore.Relational/Metadata/Internal/InternalDbFunctionParameterBuilder.cs index d685bb140b9..bcb335475f3 100644 --- a/src/EFCore.Relational/Metadata/Internal/InternalDbFunctionParameterBuilder.cs +++ b/src/EFCore.Relational/Metadata/Internal/InternalDbFunctionParameterBuilder.cs @@ -9,6 +9,12 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// + /// 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. + /// + /// /// /// Provides a simple API for configuring a . /// @@ -16,7 +22,7 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Internal /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// + /// public class InternalDbFunctionParameterBuilder : AnnotatableBuilder, IConventionDbFunctionParameterBuilder { diff --git a/src/EFCore.Relational/Metadata/RelationalAnnotationProvider.cs b/src/EFCore.Relational/Metadata/RelationalAnnotationProvider.cs index 58eb86480c5..a5ab0d229e1 100644 --- a/src/EFCore.Relational/Metadata/RelationalAnnotationProvider.cs +++ b/src/EFCore.Relational/Metadata/RelationalAnnotationProvider.cs @@ -10,18 +10,18 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// A base class inherited by database providers that gives access to annotations - /// used by relational EF Core components on various elements of the . - /// + /// A base class inherited by database providers that gives access to annotations + /// used by relational EF Core components on various elements of the . + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class RelationalAnnotationProvider : IRelationalAnnotationProvider { diff --git a/src/EFCore.Relational/Metadata/RelationalAnnotationProviderDependencies.cs b/src/EFCore.Relational/Metadata/RelationalAnnotationProviderDependencies.cs index 9acf6150acb..3557aa74d18 100644 --- a/src/EFCore.Relational/Metadata/RelationalAnnotationProviderDependencies.cs +++ b/src/EFCore.Relational/Metadata/RelationalAnnotationProviderDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Metadata /// 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 @@ -34,34 +36,23 @@ namespace Microsoft.EntityFrameworkCore.Metadata /// 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. /// - /// + /// public sealed record RelationalAnnotationProviderDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalAnnotationProviderDependencies() { diff --git a/src/EFCore.Relational/Migrations/HistoryRepository.cs b/src/EFCore.Relational/Migrations/HistoryRepository.cs index 6d784303beb..54b5c3d9f5d 100644 --- a/src/EFCore.Relational/Migrations/HistoryRepository.cs +++ b/src/EFCore.Relational/Migrations/HistoryRepository.cs @@ -19,10 +19,10 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// A base class for the repository used to access the '__EFMigrationsHistory' table that tracks metadata - /// about EF Core Migrations such as which migrations have been applied. - /// + /// A base class for the repository used to access the '__EFMigrationsHistory' table that tracks metadata + /// about EF Core Migrations such as which migrations have been applied. + /// + /// /// /// Database providers must inherit from this class to implement provider-specific functionality. /// @@ -32,9 +32,9 @@ namespace Microsoft.EntityFrameworkCore.Migrations /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// // TODO: Leverage query pipeline for GetAppliedMigrations // TODO: Leverage update pipeline for GetInsertScript & GetDeleteScript @@ -107,10 +107,10 @@ private IModel EnsureModel() var modelBuilder = new ModelBuilder(conventionSet); modelBuilder.Entity( x => - { - ConfigureTable(x); - x.ToTable(TableName, TableSchema); - }); + { + ConfigureTable(x); + x.ToTable(TableName, TableSchema); + }); _model = Dependencies.ModelRuntimeInitializer.Initialize( (IModel)modelBuilder.Model, designTime: true, validationLogger: null); @@ -197,13 +197,11 @@ public virtual string GetCreateScript() } /// - /// /// Configures the entity type mapped to the history table. - /// - /// - /// Database providers can override this to add or replace configuration. - /// /// + /// + /// Database providers can override this to add or replace configuration. + /// /// A builder for the entity type. protected virtual void ConfigureTable(EntityTypeBuilder history) { diff --git a/src/EFCore.Relational/Migrations/HistoryRepositoryDependencies.cs b/src/EFCore.Relational/Migrations/HistoryRepositoryDependencies.cs index eebd07d8285..c75517d1342 100644 --- a/src/EFCore.Relational/Migrations/HistoryRepositoryDependencies.cs +++ b/src/EFCore.Relational/Migrations/HistoryRepositoryDependencies.cs @@ -19,14 +19,8 @@ namespace Microsoft.EntityFrameworkCore.Migrations /// 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. - /// + /// + /// /// /// 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 @@ -41,34 +35,23 @@ namespace Microsoft.EntityFrameworkCore.Migrations /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record HistoryRepositoryDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// #pragma warning disable CS0618 // Type or member is obsolete [EntityFrameworkInternal] public HistoryRepositoryDependencies( diff --git a/src/EFCore.Relational/Migrations/IHistoryRepository.cs b/src/EFCore.Relational/Migrations/IHistoryRepository.cs index fbb61689a60..a224b00f762 100644 --- a/src/EFCore.Relational/Migrations/IHistoryRepository.cs +++ b/src/EFCore.Relational/Migrations/IHistoryRepository.cs @@ -10,10 +10,10 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// An interface for the repository used to access the '__EFMigrationsHistory' table that tracks metadata - /// about EF Core Migrations such as which migrations have been applied. - /// + /// An interface for the repository used to access the '__EFMigrationsHistory' table that tracks metadata + /// about EF Core Migrations such as which migrations have been applied. + /// + /// /// /// Database providers typically implement this service by inheriting from . /// @@ -23,9 +23,9 @@ namespace Microsoft.EntityFrameworkCore.Migrations /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public interface IHistoryRepository { diff --git a/src/EFCore.Relational/Migrations/IMigrationCommandExecutor.cs b/src/EFCore.Relational/Migrations/IMigrationCommandExecutor.cs index 695efbb9421..e7a33ce6f5f 100644 --- a/src/EFCore.Relational/Migrations/IMigrationCommandExecutor.cs +++ b/src/EFCore.Relational/Migrations/IMigrationCommandExecutor.cs @@ -11,17 +11,17 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// A service for executing migration commands against a database. - /// + /// A service for executing migration commands against a database. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public interface IMigrationCommandExecutor { diff --git a/src/EFCore.Relational/Migrations/IMigrationsAnnotationProvider.cs b/src/EFCore.Relational/Migrations/IMigrationsAnnotationProvider.cs index 1c67e834278..7e3ad4c035e 100644 --- a/src/EFCore.Relational/Migrations/IMigrationsAnnotationProvider.cs +++ b/src/EFCore.Relational/Migrations/IMigrationsAnnotationProvider.cs @@ -10,19 +10,19 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// A service typically implemented by database providers that gives access to annotations used by EF Core Migrations - /// when generating removal operations for various elements of the . The annotations - /// stored in the relational model are provided by . - /// + /// A service typically implemented by database providers that gives access to annotations used by EF Core Migrations + /// when generating removal operations for various elements of the . The annotations + /// stored in the relational model are provided by . + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public interface IMigrationsAnnotationProvider { diff --git a/src/EFCore.Relational/Migrations/IMigrationsAssembly.cs b/src/EFCore.Relational/Migrations/IMigrationsAssembly.cs index a304a59c8b9..ce6f4e168d5 100644 --- a/src/EFCore.Relational/Migrations/IMigrationsAssembly.cs +++ b/src/EFCore.Relational/Migrations/IMigrationsAssembly.cs @@ -10,18 +10,18 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// A service representing an assembly containing EF Core Migrations. - /// + /// A service representing an assembly containing EF Core Migrations. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public interface IMigrationsAssembly { diff --git a/src/EFCore.Relational/Migrations/IMigrationsIdGenerator.cs b/src/EFCore.Relational/Migrations/IMigrationsIdGenerator.cs index 9ca1dc647cd..825f6ed06ee 100644 --- a/src/EFCore.Relational/Migrations/IMigrationsIdGenerator.cs +++ b/src/EFCore.Relational/Migrations/IMigrationsIdGenerator.cs @@ -6,17 +6,17 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// A service for generating migration identifiers from names and names from identifiers. - /// + /// A service for generating migration identifiers from names and names from identifiers. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public interface IMigrationsIdGenerator { diff --git a/src/EFCore.Relational/Migrations/IMigrationsModelDiffer.cs b/src/EFCore.Relational/Migrations/IMigrationsModelDiffer.cs index fb5386f257e..4642b209483 100644 --- a/src/EFCore.Relational/Migrations/IMigrationsModelDiffer.cs +++ b/src/EFCore.Relational/Migrations/IMigrationsModelDiffer.cs @@ -9,20 +9,20 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// A service for finding differences between two s and transforming - /// those differences into s that can be used to - /// update the database. - /// + /// A service for finding differences between two s and transforming + /// those differences into s that can be used to + /// update the database. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public interface IMigrationsModelDiffer { diff --git a/src/EFCore.Relational/Migrations/IMigrationsSqlGenerator.cs b/src/EFCore.Relational/Migrations/IMigrationsSqlGenerator.cs index b684f832708..443f40ea289 100644 --- a/src/EFCore.Relational/Migrations/IMigrationsSqlGenerator.cs +++ b/src/EFCore.Relational/Migrations/IMigrationsSqlGenerator.cs @@ -9,19 +9,19 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// A service for generating objects that can - /// then be executed or scripted from a list of s. - /// + /// A service for generating objects that can + /// then be executed or scripted from a list of s. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public interface IMigrationsSqlGenerator { diff --git a/src/EFCore.Relational/Migrations/IMigrator.cs b/src/EFCore.Relational/Migrations/IMigrator.cs index 01689c41a38..df6d6242999 100644 --- a/src/EFCore.Relational/Migrations/IMigrator.cs +++ b/src/EFCore.Relational/Migrations/IMigrator.cs @@ -9,19 +9,19 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// The main service used to generated an EF Core Migrations script or - /// migrate a database directly. - /// + /// The main service used to generated an EF Core Migrations script or + /// migrate a database directly. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public interface IMigrator { diff --git a/src/EFCore.Relational/Migrations/Internal/MigrationCommandExecutor.cs b/src/EFCore.Relational/Migrations/Internal/MigrationCommandExecutor.cs index 0d7db33acdd..3d20118fb0b 100644 --- a/src/EFCore.Relational/Migrations/Internal/MigrationCommandExecutor.cs +++ b/src/EFCore.Relational/Migrations/Internal/MigrationCommandExecutor.cs @@ -15,18 +15,16 @@ namespace Microsoft.EntityFrameworkCore.Migrations.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class MigrationCommandExecutor : IMigrationCommandExecutor { /// diff --git a/src/EFCore.Relational/Migrations/Internal/MigrationsAssembly.cs b/src/EFCore.Relational/Migrations/Internal/MigrationsAssembly.cs index 14f7899e9fe..33d29a2f68f 100644 --- a/src/EFCore.Relational/Migrations/Internal/MigrationsAssembly.cs +++ b/src/EFCore.Relational/Migrations/Internal/MigrationsAssembly.cs @@ -13,19 +13,17 @@ namespace Microsoft.EntityFrameworkCore.Migrations.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class MigrationsAssembly : IMigrationsAssembly { private readonly IMigrationsIdGenerator _idGenerator; diff --git a/src/EFCore.Relational/Migrations/Internal/MigrationsIdGenerator.cs b/src/EFCore.Relational/Migrations/Internal/MigrationsIdGenerator.cs index 62eb5a5dd77..f7af0ba7006 100644 --- a/src/EFCore.Relational/Migrations/Internal/MigrationsIdGenerator.cs +++ b/src/EFCore.Relational/Migrations/Internal/MigrationsIdGenerator.cs @@ -9,18 +9,16 @@ namespace Microsoft.EntityFrameworkCore.Migrations.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class MigrationsIdGenerator : IMigrationsIdGenerator { private const string Format = "yyyyMMddHHmmss"; diff --git a/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs b/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs index c67f572deb4..fb81104a7d8 100644 --- a/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs +++ b/src/EFCore.Relational/Migrations/Internal/MigrationsModelDiffer.cs @@ -24,19 +24,17 @@ namespace Microsoft.EntityFrameworkCore.Migrations.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class MigrationsModelDiffer : IMigrationsModelDiffer { private static readonly Type[] _dropOperationTypes = @@ -314,22 +312,22 @@ protected virtual IReadOnlyList Sort( createTableOperations = (List)createTableGraph.TopologicalSort( (principalCreateTableOperation, createTableOperation, cyclicAddForeignKeyOperations) => + { + foreach (var cyclicAddForeignKeyOperation in cyclicAddForeignKeyOperations) { - foreach (var cyclicAddForeignKeyOperation in cyclicAddForeignKeyOperations) + var removed = createTableOperation.ForeignKeys.Remove(cyclicAddForeignKeyOperation); + if (removed) { - var removed = createTableOperation.ForeignKeys.Remove(cyclicAddForeignKeyOperation); - if (removed) - { - constraintOperations.Add(cyclicAddForeignKeyOperation); - } - else - { - Check.DebugAssert(false, "Operation removed twice: " + cyclicAddForeignKeyOperation); - } + constraintOperations.Add(cyclicAddForeignKeyOperation); + } + else + { + Check.DebugAssert(false, "Operation removed twice: " + cyclicAddForeignKeyOperation); } + } - return true; - }); + return true; + }); var dropTableGraph = new Multigraph(); dropTableGraph.AddVertices(dropTableOperations); @@ -350,11 +348,11 @@ protected virtual IReadOnlyList Sort( var newDiffContext = new DiffContext(); dropTableOperations = (List)dropTableGraph.TopologicalSort( (dropTableOperation, principalDropTableOperation, foreignKeys) => - { - dropForeignKeyOperations.AddRange(foreignKeys.SelectMany(c => Remove(c, newDiffContext))); + { + dropForeignKeyOperations.AddRange(foreignKeys.SelectMany(c => Remove(c, newDiffContext))); - return true; - }); + return true; + }); return dropForeignKeyOperations .Concat(dropTableOperations) @@ -403,8 +401,7 @@ protected virtual IEnumerable Diff( { var alterDatabaseOperation = new AlterDatabaseOperation { - Collation = target.Collation, - OldDatabase = { Collation = source.Collation } + Collation = target.Collation, OldDatabase = { Collation = source.Collation } }; alterDatabaseOperation.AddAnnotations(targetMigrationsAnnotations); @@ -2152,10 +2149,10 @@ protected virtual IEnumerable GetDataOperations( sourceEntry.EntityType.GetReferencingForeignKeys() .Where( fk => - { - var behavior = diffContext.FindTarget(fk)?.DeleteBehavior; - return behavior != null && behavior != DeleteBehavior.ClientNoAction; - })); + { + var behavior = diffContext.FindTarget(fk)?.DeleteBehavior; + return behavior != null && behavior != DeleteBehavior.ClientNoAction; + })); } } } diff --git a/src/EFCore.Relational/Migrations/Internal/Migrator.cs b/src/EFCore.Relational/Migrations/Internal/Migrator.cs index 049bbbb3de4..367bd5711a5 100644 --- a/src/EFCore.Relational/Migrations/Internal/Migrator.cs +++ b/src/EFCore.Relational/Migrations/Internal/Migrator.cs @@ -17,19 +17,17 @@ namespace Microsoft.EntityFrameworkCore.Migrations.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class Migrator : IMigrator { private readonly IMigrationsAssembly _migrationsAssembly; @@ -193,25 +191,25 @@ private IEnumerable>> GetMigrationCommandLi var index = i; yield return () => - { - _logger.MigrationReverting(this, migration); - - return GenerateDownSql( - migration, - index != migrationsToRevert.Count - 1 - ? migrationsToRevert[index + 1] - : actualTargetMigration); - }; + { + _logger.MigrationReverting(this, migration); + + return GenerateDownSql( + migration, + index != migrationsToRevert.Count - 1 + ? migrationsToRevert[index + 1] + : actualTargetMigration); + }; } foreach (var migration in migrationsToApply) { yield return () => - { - _logger.MigrationApplying(this, migration); + { + _logger.MigrationApplying(this, migration); - return GenerateUpSql(migration); - }; + return GenerateUpSql(migration); + }; } if (migrationsToRevert.Count + migrationsToApply.Count == 0) diff --git a/src/EFCore.Relational/Migrations/Migration.cs b/src/EFCore.Relational/Migrations/Migration.cs index 33bcd029c6b..df2ec065520 100644 --- a/src/EFCore.Relational/Migrations/Migration.cs +++ b/src/EFCore.Relational/Migrations/Migration.cs @@ -50,48 +50,48 @@ IModel Create() } /// - /// - /// The s that will migrate the database 'up'. - /// + /// The s that will migrate the database 'up'. + /// + /// /// /// That is, those operations that need to be applied to the database /// to take it from the state left in by the previous migration so that it is up-to-date /// with regard to this migration. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public virtual IReadOnlyList UpOperations => _upOperations ??= BuildOperations(Up); /// - /// - /// The s that will migrate the database 'down'. - /// + /// The s that will migrate the database 'down'. + /// + /// /// /// That is, those operations that need to be applied to the database /// to take it from the state left in by this migration so that it returns to the /// state that it was in before this migration was applied. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public virtual IReadOnlyList DownOperations => _downOperations ??= BuildOperations(Down); /// - /// - /// The name of the current database provider. - /// + /// The name of the current database provider. + /// + /// /// /// This can be used to write conditional code in the migration such that different changes /// can be made to the database depending on the type of database being used. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// [DisallowNull] public virtual string? ActiveProvider { get; set; } @@ -108,9 +108,9 @@ protected virtual void BuildTargetModel(ModelBuilder modelBuilder) } /// - /// - /// Builds the operations that will migrate the database 'up'. - /// + /// Builds the operations that will migrate the database 'up'. + /// + /// /// /// That is, builds the operations that will take the database from the state left in by the /// previous migration so that it is up-to-date with regard to this migration. @@ -118,17 +118,17 @@ protected virtual void BuildTargetModel(ModelBuilder modelBuilder) /// /// This method must be overridden in each class that inherits from . /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// /// The that will build the operations. protected abstract void Up(MigrationBuilder migrationBuilder); /// - /// - /// Builds the operations that will migrate the database 'down'. - /// + /// Builds the operations that will migrate the database 'down'. + /// + /// /// /// That is, builds the operations that will take the database from the state left in by /// this migration so that it returns to the state that it was in before this migration was applied. @@ -138,9 +138,9 @@ protected virtual void BuildTargetModel(ModelBuilder modelBuilder) /// both 'up' and 'down' migrations are to be supported. If it is not overridden, then calling it /// will throw and it will not be possible to migrate in the 'down' direction. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// /// The that will build the operations. protected virtual void Down(MigrationBuilder migrationBuilder) diff --git a/src/EFCore.Relational/Migrations/MigrationsAnnotationProvider.cs b/src/EFCore.Relational/Migrations/MigrationsAnnotationProvider.cs index 851776f1015..c944015ce4f 100644 --- a/src/EFCore.Relational/Migrations/MigrationsAnnotationProvider.cs +++ b/src/EFCore.Relational/Migrations/MigrationsAnnotationProvider.cs @@ -11,18 +11,18 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// A base class inherited by database providers that gives access to annotations used by EF Core Migrations - /// when generating removal operations for various elements of the . - /// + /// A base class inherited by database providers that gives access to annotations used by EF Core Migrations + /// when generating removal operations for various elements of the . + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public class MigrationsAnnotationProvider : IMigrationsAnnotationProvider { diff --git a/src/EFCore.Relational/Migrations/MigrationsAnnotationProviderDependencies.cs b/src/EFCore.Relational/Migrations/MigrationsAnnotationProviderDependencies.cs index 865cb01d035..77a8aef3051 100644 --- a/src/EFCore.Relational/Migrations/MigrationsAnnotationProviderDependencies.cs +++ b/src/EFCore.Relational/Migrations/MigrationsAnnotationProviderDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Migrations /// 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 @@ -34,35 +36,24 @@ namespace Microsoft.EntityFrameworkCore.Migrations /// 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. /// - /// + /// [EntityFrameworkInternal] public sealed record MigrationsAnnotationProviderDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public MigrationsAnnotationProviderDependencies() { diff --git a/src/EFCore.Relational/Migrations/MigrationsAssemblyExtensions.cs b/src/EFCore.Relational/Migrations/MigrationsAssemblyExtensions.cs index d8ecc234556..7ffc00928f7 100644 --- a/src/EFCore.Relational/Migrations/MigrationsAssemblyExtensions.cs +++ b/src/EFCore.Relational/Migrations/MigrationsAssemblyExtensions.cs @@ -16,17 +16,17 @@ namespace Microsoft.EntityFrameworkCore.Migrations public static class MigrationsAssemblyExtensions { /// - /// - /// Gets a migration identifier in the assembly with the given a full migration name or - /// just its identifier. - /// + /// Gets a migration identifier in the assembly with the given a full migration name or + /// just its identifier. + /// + /// /// /// An exception is thrown if the migration was not found--use /// if the migration may not exist. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// /// The assembly. /// The name or identifier to lookup. diff --git a/src/EFCore.Relational/Migrations/MigrationsSqlGenerator.cs b/src/EFCore.Relational/Migrations/MigrationsSqlGenerator.cs index 0ab5b4693d7..d5f42725144 100644 --- a/src/EFCore.Relational/Migrations/MigrationsSqlGenerator.cs +++ b/src/EFCore.Relational/Migrations/MigrationsSqlGenerator.cs @@ -19,10 +19,10 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// Generates the SQL in objects that can - /// then be executed or scripted from a list of s. - /// + /// Generates the SQL in objects that can + /// then be executed or scripted from a list of s. + /// + /// /// /// This class is typically inherited by database providers to customize the SQL generation. /// @@ -32,9 +32,9 @@ namespace Microsoft.EntityFrameworkCore.Migrations /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public class MigrationsSqlGenerator : IMigrationsSqlGenerator { @@ -148,17 +148,15 @@ public virtual IReadOnlyList Generate( } /// - /// - /// Builds commands for the given by making calls on the given - /// . - /// - /// - /// This method uses a double-dispatch mechanism to call one of the 'Generate' methods that are - /// specific to a certain subtype of . Typically database providers - /// will override these specific methods rather than this method. However, providers can override - /// this methods to handle provider-specific operations. - /// + /// Builds commands for the given by making calls on the given + /// . /// + /// + /// This method uses a double-dispatch mechanism to call one of the 'Generate' methods that are + /// specific to a certain subtype of . Typically database providers + /// will override these specific methods rather than this method. However, providers can override + /// this methods to handle provider-specific operations. + /// /// The operation. /// The target model which may be if the operations exist without a model. /// The command builder to use to build the commands. @@ -325,15 +323,13 @@ protected virtual void Generate( } /// - /// - /// Can be overridden by database providers to build commands for the given - /// by making calls on the given . - /// - /// - /// Note that the default implementation of this method throws . Providers - /// must override if they are to support this kind of operation. - /// + /// Can be overridden by database providers to build commands for the given + /// by making calls on the given . /// + /// + /// Note that the default implementation of this method throws . Providers + /// must override if they are to support this kind of operation. + /// /// The operation. /// The target model which may be if the operations exist without a model. /// The command builder to use to build the commands. @@ -344,15 +340,13 @@ protected virtual void Generate( => throw new NotSupportedException(RelationalStrings.MigrationSqlGenerationMissing(nameof(AlterColumnOperation))); /// - /// - /// Can be overridden by database providers to build commands for the given - /// by making calls on the given . - /// - /// - /// Note that there is no default implementation of this method. Providers must override if they are to - /// support this kind of operation. - /// + /// Can be overridden by database providers to build commands for the given + /// by making calls on the given . /// + /// + /// Note that there is no default implementation of this method. Providers must override if they are to + /// support this kind of operation. + /// /// The operation. /// The target model which may be if the operations exist without a model. /// The command builder to use to build the commands. @@ -364,15 +358,13 @@ protected virtual void Generate( } /// - /// - /// Can be overridden by database providers to build commands for the given - /// by making calls on the given . - /// - /// - /// Note that the default implementation of this method throws . Providers - /// must override if they are to support this kind of operation. - /// + /// Can be overridden by database providers to build commands for the given + /// by making calls on the given . /// + /// + /// Note that the default implementation of this method throws . Providers + /// must override if they are to support this kind of operation. + /// /// The operation. /// The target model which may be if the operations exist without a model. /// The command builder to use to build the commands. @@ -409,16 +401,14 @@ protected virtual void Generate( } /// - /// - /// Can be overridden by database providers to build commands for the given - /// by making calls on the given . - /// - /// - /// Note that the default implementation of this method does nothing because there is no common metadata - /// relating to this operation. Providers only need to override this method if they have some provider-specific - /// annotations that must be handled. - /// + /// Can be overridden by database providers to build commands for the given + /// by making calls on the given . /// + /// + /// Note that the default implementation of this method does nothing because there is no common metadata + /// relating to this operation. Providers only need to override this method if they have some provider-specific + /// annotations that must be handled. + /// /// The operation. /// The target model which may be if the operations exist without a model. /// The command builder to use to build the commands. @@ -430,15 +420,13 @@ protected virtual void Generate( } /// - /// - /// Can be overridden by database providers to build commands for the given - /// by making calls on the given . - /// - /// - /// Note that the default implementation of this method throws . Providers - /// must override if they are to support this kind of operation. - /// + /// Can be overridden by database providers to build commands for the given + /// by making calls on the given . /// + /// + /// Note that the default implementation of this method throws . Providers + /// must override if they are to support this kind of operation. + /// /// The operation. /// The target model which may be if the operations exist without a model. /// The command builder to use to build the commands. @@ -493,15 +481,13 @@ protected virtual void Generate( } /// - /// - /// Can be overridden by database providers to build commands for the given - /// by making calls on the given . - /// - /// - /// Note that the default implementation of this method throws . Providers - /// must override if they are to support this kind of operation. - /// + /// Can be overridden by database providers to build commands for the given + /// by making calls on the given . /// + /// + /// Note that the default implementation of this method throws . Providers + /// must override if they are to support this kind of operation. + /// /// The operation. /// The target model which may be if the operations exist without a model. /// The command builder to use to build the commands. @@ -652,15 +638,13 @@ protected virtual void Generate( } /// - /// - /// Can be overridden by database providers to build commands for the given - /// by making calls on the given . - /// - /// - /// Note that the default implementation of this method throws . Providers - /// must override if they are to support this kind of operation. - /// + /// Can be overridden by database providers to build commands for the given + /// by making calls on the given . /// + /// + /// Note that the default implementation of this method throws . Providers + /// must override if they are to support this kind of operation. + /// /// The operation. /// The target model which may be if the operations exist without a model. /// The command builder to use to build the commands. @@ -827,15 +811,13 @@ protected virtual void Generate( } /// - /// - /// Can be overridden by database providers to build commands for the given - /// by making calls on the given . - /// - /// - /// Note that the default implementation of this method throws . Providers - /// must override if they are to support this kind of operation. - /// + /// Can be overridden by database providers to build commands for the given + /// by making calls on the given . /// + /// + /// Note that the default implementation of this method throws . Providers + /// must override if they are to support this kind of operation. + /// /// The operation. /// The target model which may be if the operations exist without a model. /// The command builder to use to build the commands. @@ -846,15 +828,13 @@ protected virtual void Generate( => throw new NotSupportedException(RelationalStrings.MigrationSqlGenerationMissing(nameof(RenameColumnOperation))); /// - /// - /// Can be overridden by database providers to build commands for the given - /// by making calls on the given . - /// - /// - /// Note that the default implementation of this method throws . Providers - /// must override if they are to support this kind of operation. - /// + /// Can be overridden by database providers to build commands for the given + /// by making calls on the given . /// + /// + /// Note that the default implementation of this method throws . Providers + /// must override if they are to support this kind of operation. + /// /// The operation. /// The target model which may be if the operations exist without a model. /// The command builder to use to build the commands. @@ -1885,15 +1865,13 @@ protected virtual void ForeignKeyAction( ?.EntityTypeMappings.Select(m => m.EntityType); /// - /// - /// Finds some mapped to the given column. - /// - /// - /// If multiple properties map to the same column, then the property returned is one chosen - /// arbitrarily. The model validator ensures that all properties mapped to a given column - /// have consistent configuration. - /// + /// Finds some mapped to the given column. /// + /// + /// If multiple properties map to the same column, then the property returned is one chosen + /// arbitrarily. The model validator ensures that all properties mapped to a given column + /// have consistent configuration. + /// /// The target model which may be if the operations exist without a model. /// The schema that contains the table, or to use the default schema. /// The name of the table that contains the column. diff --git a/src/EFCore.Relational/Migrations/MigrationsSqlGeneratorDependencies.cs b/src/EFCore.Relational/Migrations/MigrationsSqlGeneratorDependencies.cs index 45a1dab21dc..a7fcdb1c2a9 100644 --- a/src/EFCore.Relational/Migrations/MigrationsSqlGeneratorDependencies.cs +++ b/src/EFCore.Relational/Migrations/MigrationsSqlGeneratorDependencies.cs @@ -18,6 +18,8 @@ namespace Microsoft.EntityFrameworkCore.Migrations /// 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 @@ -32,28 +34,23 @@ namespace Microsoft.EntityFrameworkCore.Migrations /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record MigrationsSqlGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public MigrationsSqlGeneratorDependencies( IRelationalCommandBuilderFactory commandBuilderFactory, diff --git a/src/EFCore.Relational/Migrations/Operations/Builders/ColumnsBuilder.cs b/src/EFCore.Relational/Migrations/Operations/Builders/ColumnsBuilder.cs index 4b5d85ea6c2..789074853d7 100644 --- a/src/EFCore.Relational/Migrations/Operations/Builders/ColumnsBuilder.cs +++ b/src/EFCore.Relational/Migrations/Operations/Builders/ColumnsBuilder.cs @@ -25,13 +25,11 @@ public ColumnsBuilder(CreateTableOperation createTableOperation) } /// - /// - /// Adds a to the . - /// - /// - /// Note that for nullable parameters a value means not-specified. - /// + /// Adds a to the . /// + /// + /// Note that for nullable parameters a value means not-specified. + /// /// The CLR type of the column. /// The database type of the column. /// Indicates whether or not the column will store Unicode data. diff --git a/src/EFCore.Relational/Migrations/Operations/IAlterMigrationOperation.cs b/src/EFCore.Relational/Migrations/Operations/IAlterMigrationOperation.cs index 7858e4c0967..4a588bc289f 100644 --- a/src/EFCore.Relational/Migrations/Operations/IAlterMigrationOperation.cs +++ b/src/EFCore.Relational/Migrations/Operations/IAlterMigrationOperation.cs @@ -6,17 +6,17 @@ namespace Microsoft.EntityFrameworkCore.Migrations.Operations { /// - /// - /// An interface for any that alters some existing database object. - /// + /// An interface for any that alters some existing database object. + /// + /// /// /// All such operations contain an 'Old...' property that provides access to the configuration to the /// database object as it was before being altered. This interface provides a common way to access /// annotations on that 'old' database object. /// - /// - /// - /// See Database migrations for more information. + /// + /// See Database migrations for more information. + /// /// public interface IAlterMigrationOperation { diff --git a/src/EFCore.Relational/Migrations/ReferentialAction.cs b/src/EFCore.Relational/Migrations/ReferentialAction.cs index d008a4b312e..d6b62d61039 100644 --- a/src/EFCore.Relational/Migrations/ReferentialAction.cs +++ b/src/EFCore.Relational/Migrations/ReferentialAction.cs @@ -4,15 +4,13 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// The action that a database may take when handling a foreign key constraint as - /// part of an update or delete. - /// - /// - /// Note that some database engines do not support or correctly honor every action. - /// + /// The action that a database may take when handling a foreign key constraint as + /// part of an update or delete. /// /// + /// Note that some database engines do not support or correctly honor every action. + /// + /// /// See Database migrations for more information. /// public enum ReferentialAction diff --git a/src/EFCore.Relational/Query/IMemberTranslatorPlugin.cs b/src/EFCore.Relational/Query/IMemberTranslatorPlugin.cs index f65caf013f3..40cd7795a41 100644 --- a/src/EFCore.Relational/Query/IMemberTranslatorPlugin.cs +++ b/src/EFCore.Relational/Query/IMemberTranslatorPlugin.cs @@ -7,16 +7,14 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Represents plugin for . - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// Represents plugin for . /// + /// + /// The service lifetime is . This means that each + /// 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 interface IMemberTranslatorPlugin { /// diff --git a/src/EFCore.Relational/Query/IMemberTranslatorProvider.cs b/src/EFCore.Relational/Query/IMemberTranslatorProvider.cs index 4a34505877a..e007c4ea400 100644 --- a/src/EFCore.Relational/Query/IMemberTranslatorProvider.cs +++ b/src/EFCore.Relational/Query/IMemberTranslatorProvider.cs @@ -11,15 +11,13 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Provides translations for LINQ expressions. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// Provides translations for LINQ expressions. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IMemberTranslatorProvider { /// diff --git a/src/EFCore.Relational/Query/IMethodCallTranslatorPlugin.cs b/src/EFCore.Relational/Query/IMethodCallTranslatorPlugin.cs index 6ba29893c32..ee76714f0ec 100644 --- a/src/EFCore.Relational/Query/IMethodCallTranslatorPlugin.cs +++ b/src/EFCore.Relational/Query/IMethodCallTranslatorPlugin.cs @@ -7,16 +7,14 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Represents plugin for . - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means a single instance of each service is used by many - /// instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// Represents plugin for . /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means a single instance of each service is used by many + /// instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IMethodCallTranslatorPlugin { /// diff --git a/src/EFCore.Relational/Query/IMethodCallTranslatorProvider.cs b/src/EFCore.Relational/Query/IMethodCallTranslatorProvider.cs index d9b1739d2a1..4093b85aed2 100644 --- a/src/EFCore.Relational/Query/IMethodCallTranslatorProvider.cs +++ b/src/EFCore.Relational/Query/IMethodCallTranslatorProvider.cs @@ -12,15 +12,13 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Provides translations for LINQ expressions. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// Provides translations for LINQ expressions. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IMethodCallTranslatorProvider { /// diff --git a/src/EFCore.Relational/Query/IQuerySqlGeneratorFactory.cs b/src/EFCore.Relational/Query/IQuerySqlGeneratorFactory.cs index 0450f4a2e81..0bc852f2aa2 100644 --- a/src/EFCore.Relational/Query/IQuerySqlGeneratorFactory.cs +++ b/src/EFCore.Relational/Query/IQuerySqlGeneratorFactory.cs @@ -6,15 +6,13 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// A factory for creating instances. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// A factory for creating instances. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IQuerySqlGeneratorFactory { /// diff --git a/src/EFCore.Relational/Query/IRelationalParameterBasedSqlProcessorFactory.cs b/src/EFCore.Relational/Query/IRelationalParameterBasedSqlProcessorFactory.cs index 88222a5a0f1..7c5378620d5 100644 --- a/src/EFCore.Relational/Query/IRelationalParameterBasedSqlProcessorFactory.cs +++ b/src/EFCore.Relational/Query/IRelationalParameterBasedSqlProcessorFactory.cs @@ -6,16 +6,14 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// A factory for creating instances. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// A factory for creating instances. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IRelationalParameterBasedSqlProcessorFactory { /// diff --git a/src/EFCore.Relational/Query/IRelationalQueryStringFactory.cs b/src/EFCore.Relational/Query/IRelationalQueryStringFactory.cs index a2405aeed7d..7790dbfc26e 100644 --- a/src/EFCore.Relational/Query/IRelationalQueryStringFactory.cs +++ b/src/EFCore.Relational/Query/IRelationalQueryStringFactory.cs @@ -14,13 +14,13 @@ namespace Microsoft.EntityFrameworkCore.Query /// This interface is typically used by database providers (and other extensions). It is generally /// not used in application code. /// - /// - /// The service lifetime is . This means that each - /// 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. - /// /// + /// + /// The service lifetime is . This means that each + /// 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 interface IRelationalQueryStringFactory { /// diff --git a/src/EFCore.Relational/Query/IRelationalSqlTranslatingExpressionVisitorFactory.cs b/src/EFCore.Relational/Query/IRelationalSqlTranslatingExpressionVisitorFactory.cs index fcbb949952c..394759eda41 100644 --- a/src/EFCore.Relational/Query/IRelationalSqlTranslatingExpressionVisitorFactory.cs +++ b/src/EFCore.Relational/Query/IRelationalSqlTranslatingExpressionVisitorFactory.cs @@ -6,16 +6,14 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// A factory for creating instances. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// A factory for creating instances. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IRelationalSqlTranslatingExpressionVisitorFactory { /// diff --git a/src/EFCore.Relational/Query/ISqlExpressionFactory.cs b/src/EFCore.Relational/Query/ISqlExpressionFactory.cs index efa9155b325..cfba7b56c67 100644 --- a/src/EFCore.Relational/Query/ISqlExpressionFactory.cs +++ b/src/EFCore.Relational/Query/ISqlExpressionFactory.cs @@ -13,16 +13,14 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// A factory for creating instances. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// A factory for creating instances. /// + /// + /// The service lifetime is . This means that each + /// 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 interface ISqlExpressionFactory { /// diff --git a/src/EFCore.Relational/Query/Internal/QuerySqlGeneratorFactory.cs b/src/EFCore.Relational/Query/Internal/QuerySqlGeneratorFactory.cs index ae4e874976a..cc2c83aea39 100644 --- a/src/EFCore.Relational/Query/Internal/QuerySqlGeneratorFactory.cs +++ b/src/EFCore.Relational/Query/Internal/QuerySqlGeneratorFactory.cs @@ -7,18 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class QuerySqlGeneratorFactory : IQuerySqlGeneratorFactory { /// diff --git a/src/EFCore.Relational/Query/Internal/RelationalParameterBasedSqlProcessorFactory.cs b/src/EFCore.Relational/Query/Internal/RelationalParameterBasedSqlProcessorFactory.cs index 2d18fa847c9..ce608ca26d1 100644 --- a/src/EFCore.Relational/Query/Internal/RelationalParameterBasedSqlProcessorFactory.cs +++ b/src/EFCore.Relational/Query/Internal/RelationalParameterBasedSqlProcessorFactory.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class RelationalParameterBasedSqlProcessorFactory : IRelationalParameterBasedSqlProcessorFactory { /// diff --git a/src/EFCore.Relational/Query/Internal/RelationalQueryCompilationContextFactory.cs b/src/EFCore.Relational/Query/Internal/RelationalQueryCompilationContextFactory.cs index c34f1e423df..946e156d247 100644 --- a/src/EFCore.Relational/Query/Internal/RelationalQueryCompilationContextFactory.cs +++ b/src/EFCore.Relational/Query/Internal/RelationalQueryCompilationContextFactory.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class RelationalQueryCompilationContextFactory : IQueryCompilationContextFactory { /// diff --git a/src/EFCore.Relational/Query/Internal/RelationalQueryContextFactory.cs b/src/EFCore.Relational/Query/Internal/RelationalQueryContextFactory.cs index b65dd3a80b0..0b0d735124c 100644 --- a/src/EFCore.Relational/Query/Internal/RelationalQueryContextFactory.cs +++ b/src/EFCore.Relational/Query/Internal/RelationalQueryContextFactory.cs @@ -6,19 +6,17 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class RelationalQueryContextFactory : IQueryContextFactory { /// diff --git a/src/EFCore.Relational/Query/Internal/RelationalQueryTranslationPostprocessorFactory.cs b/src/EFCore.Relational/Query/Internal/RelationalQueryTranslationPostprocessorFactory.cs index 7293cd2a160..226612ead10 100644 --- a/src/EFCore.Relational/Query/Internal/RelationalQueryTranslationPostprocessorFactory.cs +++ b/src/EFCore.Relational/Query/Internal/RelationalQueryTranslationPostprocessorFactory.cs @@ -7,18 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class RelationalQueryTranslationPostprocessorFactory : IQueryTranslationPostprocessorFactory { /// diff --git a/src/EFCore.Relational/Query/Internal/RelationalQueryTranslationPreprocessorFactory.cs b/src/EFCore.Relational/Query/Internal/RelationalQueryTranslationPreprocessorFactory.cs index da6557cdc46..ec56461ef9a 100644 --- a/src/EFCore.Relational/Query/Internal/RelationalQueryTranslationPreprocessorFactory.cs +++ b/src/EFCore.Relational/Query/Internal/RelationalQueryTranslationPreprocessorFactory.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class RelationalQueryTranslationPreprocessorFactory : IQueryTranslationPreprocessorFactory { /// diff --git a/src/EFCore.Relational/Query/Internal/RelationalQueryableMethodTranslatingExpressionVisitorFactory.cs b/src/EFCore.Relational/Query/Internal/RelationalQueryableMethodTranslatingExpressionVisitorFactory.cs index 6d9610f5ece..de8cc171461 100644 --- a/src/EFCore.Relational/Query/Internal/RelationalQueryableMethodTranslatingExpressionVisitorFactory.cs +++ b/src/EFCore.Relational/Query/Internal/RelationalQueryableMethodTranslatingExpressionVisitorFactory.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class RelationalQueryableMethodTranslatingExpressionVisitorFactory : IQueryableMethodTranslatingExpressionVisitorFactory { /// diff --git a/src/EFCore.Relational/Query/Internal/RelationalShapedQueryCompilingExpressionVisitorFactory.cs b/src/EFCore.Relational/Query/Internal/RelationalShapedQueryCompilingExpressionVisitorFactory.cs index b2e7ffcc73c..e138d619c0f 100644 --- a/src/EFCore.Relational/Query/Internal/RelationalShapedQueryCompilingExpressionVisitorFactory.cs +++ b/src/EFCore.Relational/Query/Internal/RelationalShapedQueryCompilingExpressionVisitorFactory.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class RelationalShapedQueryCompilingExpressionVisitorFactory : IShapedQueryCompilingExpressionVisitorFactory { /// diff --git a/src/EFCore.Relational/Query/Internal/RelationalSqlTranslatingExpressionVisitorFactory.cs b/src/EFCore.Relational/Query/Internal/RelationalSqlTranslatingExpressionVisitorFactory.cs index 2bb24602ee9..238de60eb89 100644 --- a/src/EFCore.Relational/Query/Internal/RelationalSqlTranslatingExpressionVisitorFactory.cs +++ b/src/EFCore.Relational/Query/Internal/RelationalSqlTranslatingExpressionVisitorFactory.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class RelationalSqlTranslatingExpressionVisitorFactory : IRelationalSqlTranslatingExpressionVisitorFactory { /// diff --git a/src/EFCore.Relational/Query/QuerySqlGeneratorDependencies.cs b/src/EFCore.Relational/Query/QuerySqlGeneratorDependencies.cs index b656618f285..4aae4a41836 100644 --- a/src/EFCore.Relational/Query/QuerySqlGeneratorDependencies.cs +++ b/src/EFCore.Relational/Query/QuerySqlGeneratorDependencies.cs @@ -16,6 +16,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -29,28 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record QuerySqlGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public QuerySqlGeneratorDependencies( IRelationalCommandBuilderFactory relationalCommandBuilderFactory, diff --git a/src/EFCore.Relational/Query/RelationalCompiledQueryCacheKeyGenerator.cs b/src/EFCore.Relational/Query/RelationalCompiledQueryCacheKeyGenerator.cs index 3f5e7dc5fd1..359ca8f8143 100644 --- a/src/EFCore.Relational/Query/RelationalCompiledQueryCacheKeyGenerator.cs +++ b/src/EFCore.Relational/Query/RelationalCompiledQueryCacheKeyGenerator.cs @@ -19,13 +19,13 @@ namespace Microsoft.EntityFrameworkCore.Query /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// - /// - /// The service lifetime is . This means that each - /// 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. - /// /// + /// + /// The service lifetime is . This means that each + /// 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 class RelationalCompiledQueryCacheKeyGenerator : CompiledQueryCacheKeyGenerator { /// diff --git a/src/EFCore.Relational/Query/RelationalCompiledQueryCacheKeyGeneratorDependencies.cs b/src/EFCore.Relational/Query/RelationalCompiledQueryCacheKeyGeneratorDependencies.cs index f921701cdc1..01b6e49256c 100644 --- a/src/EFCore.Relational/Query/RelationalCompiledQueryCacheKeyGeneratorDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalCompiledQueryCacheKeyGeneratorDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -29,32 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalCompiledQueryCacheKeyGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// This type is typically used by database providers (and other extensions). It is generally - /// not used in application code. - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalCompiledQueryCacheKeyGeneratorDependencies(IDbContextOptions contextOptions) { diff --git a/src/EFCore.Relational/Query/RelationalEvaluatableExpressionFilter.cs b/src/EFCore.Relational/Query/RelationalEvaluatableExpressionFilter.cs index 958ae18dd5f..5005dcb62b0 100644 --- a/src/EFCore.Relational/Query/RelationalEvaluatableExpressionFilter.cs +++ b/src/EFCore.Relational/Query/RelationalEvaluatableExpressionFilter.cs @@ -9,15 +9,13 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Represents a filter for evaluatable expressions. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// Represents a filter for evaluatable expressions. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class RelationalEvaluatableExpressionFilter : EvaluatableExpressionFilter { /// diff --git a/src/EFCore.Relational/Query/RelationalEvaluatableExpressionFilterDependencies.cs b/src/EFCore.Relational/Query/RelationalEvaluatableExpressionFilterDependencies.cs index 1af8847e8e9..fab74ec1851 100644 --- a/src/EFCore.Relational/Query/RelationalEvaluatableExpressionFilterDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalEvaluatableExpressionFilterDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -27,28 +29,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record RelationalEvaluatableExpressionFilterDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalEvaluatableExpressionFilterDependencies() { diff --git a/src/EFCore.Relational/Query/RelationalMemberTranslatorProvider.cs b/src/EFCore.Relational/Query/RelationalMemberTranslatorProvider.cs index 18c8959452e..b168dde5cde 100644 --- a/src/EFCore.Relational/Query/RelationalMemberTranslatorProvider.cs +++ b/src/EFCore.Relational/Query/RelationalMemberTranslatorProvider.cs @@ -15,17 +15,15 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Provides translations for LINQ expressions by dispatching to multiple specialized member - /// translators. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// Provides translations for LINQ expressions by dispatching to multiple specialized member + /// translators. /// + /// + /// The service lifetime is . This means that each + /// 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 class RelationalMemberTranslatorProvider : IMemberTranslatorProvider { private readonly List _plugins = new(); diff --git a/src/EFCore.Relational/Query/RelationalMemberTranslatorProviderDependencies.cs b/src/EFCore.Relational/Query/RelationalMemberTranslatorProviderDependencies.cs index 1df7cce6fad..47774e806ba 100644 --- a/src/EFCore.Relational/Query/RelationalMemberTranslatorProviderDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalMemberTranslatorProviderDependencies.cs @@ -16,6 +16,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -30,28 +32,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalMemberTranslatorProviderDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalMemberTranslatorProviderDependencies( ISqlExpressionFactory sqlExpressionFactory, diff --git a/src/EFCore.Relational/Query/RelationalMethodCallTranslatorProvider.cs b/src/EFCore.Relational/Query/RelationalMethodCallTranslatorProvider.cs index 1239e3e163b..336e0cb9b24 100644 --- a/src/EFCore.Relational/Query/RelationalMethodCallTranslatorProvider.cs +++ b/src/EFCore.Relational/Query/RelationalMethodCallTranslatorProvider.cs @@ -16,17 +16,15 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Provides translations for LINQ expressions by dispatching to multiple specialized - /// method call translators. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// Provides translations for LINQ expressions by dispatching to multiple specialized + /// method call translators. /// + /// + /// The service lifetime is . This means that each + /// 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 class RelationalMethodCallTranslatorProvider : IMethodCallTranslatorProvider { private readonly List _plugins = new(); diff --git a/src/EFCore.Relational/Query/RelationalMethodCallTranslatorProviderDependencies.cs b/src/EFCore.Relational/Query/RelationalMethodCallTranslatorProviderDependencies.cs index e7fec1b389e..6e1f2d7bc25 100644 --- a/src/EFCore.Relational/Query/RelationalMethodCallTranslatorProviderDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalMethodCallTranslatorProviderDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -31,28 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalMethodCallTranslatorProviderDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalMethodCallTranslatorProviderDependencies( ISqlExpressionFactory sqlExpressionFactory, diff --git a/src/EFCore.Relational/Query/RelationalParameterBasedSqlProcessorDependencies.cs b/src/EFCore.Relational/Query/RelationalParameterBasedSqlProcessorDependencies.cs index 2a80ffc2c57..dc0862a45c9 100644 --- a/src/EFCore.Relational/Query/RelationalParameterBasedSqlProcessorDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalParameterBasedSqlProcessorDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -31,28 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalParameterBasedSqlProcessorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalParameterBasedSqlProcessorDependencies( ISqlExpressionFactory sqlExpressionFactory, diff --git a/src/EFCore.Relational/Query/RelationalQueryCompilationContextDependencies.cs b/src/EFCore.Relational/Query/RelationalQueryCompilationContextDependencies.cs index 565735ae7b9..08a28b932c8 100644 --- a/src/EFCore.Relational/Query/RelationalQueryCompilationContextDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalQueryCompilationContextDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -28,28 +30,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalQueryCompilationContextDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalQueryCompilationContextDependencies() { diff --git a/src/EFCore.Relational/Query/RelationalQueryContextDependencies.cs b/src/EFCore.Relational/Query/RelationalQueryContextDependencies.cs index 77f79b25062..83260b365d2 100644 --- a/src/EFCore.Relational/Query/RelationalQueryContextDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalQueryContextDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -31,28 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalQueryContextDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalQueryContextDependencies( IRelationalConnection relationalConnection, diff --git a/src/EFCore.Relational/Query/RelationalQueryTranslationPostprocessorDependencies.cs b/src/EFCore.Relational/Query/RelationalQueryTranslationPostprocessorDependencies.cs index 2b6fc2e8e6d..7980350f644 100644 --- a/src/EFCore.Relational/Query/RelationalQueryTranslationPostprocessorDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalQueryTranslationPostprocessorDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -29,28 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalQueryTranslationPostprocessorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalQueryTranslationPostprocessorDependencies( ISqlExpressionFactory sqlExpressionFactory) diff --git a/src/EFCore.Relational/Query/RelationalQueryTranslationPreprocessorDependencies.cs b/src/EFCore.Relational/Query/RelationalQueryTranslationPreprocessorDependencies.cs index 2eabfd0ef8a..fe156c47eee 100644 --- a/src/EFCore.Relational/Query/RelationalQueryTranslationPreprocessorDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalQueryTranslationPreprocessorDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -28,28 +30,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalQueryTranslationPreprocessorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalQueryTranslationPreprocessorDependencies() { diff --git a/src/EFCore.Relational/Query/RelationalQueryableMethodTranslatingExpressionVisitorDependencies.cs b/src/EFCore.Relational/Query/RelationalQueryableMethodTranslatingExpressionVisitorDependencies.cs index 89f166d6976..8508bda61d9 100644 --- a/src/EFCore.Relational/Query/RelationalQueryableMethodTranslatingExpressionVisitorDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalQueryableMethodTranslatingExpressionVisitorDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -29,28 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalQueryableMethodTranslatingExpressionVisitorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalQueryableMethodTranslatingExpressionVisitorDependencies( IRelationalSqlTranslatingExpressionVisitorFactory relationalSqlTranslatingExpressionVisitorFactory, diff --git a/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitorDependencies.cs b/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitorDependencies.cs index 42cffa26072..2949592bf11 100644 --- a/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitorDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitorDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -31,28 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalShapedQueryCompilingExpressionVisitorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalShapedQueryCompilingExpressionVisitorDependencies( IQuerySqlGeneratorFactory querySqlGeneratorFactory, diff --git a/src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitorDependencies.cs b/src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitorDependencies.cs index 747cff90098..5e061589d0a 100644 --- a/src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitorDependencies.cs +++ b/src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitorDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -31,28 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalSqlTranslatingExpressionVisitorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalSqlTranslatingExpressionVisitorDependencies( ISqlExpressionFactory sqlExpressionFactory, diff --git a/src/EFCore.Relational/Query/SqlExpressionFactoryDependencies.cs b/src/EFCore.Relational/Query/SqlExpressionFactoryDependencies.cs index adf6e1eacc8..2ef0460a236 100644 --- a/src/EFCore.Relational/Query/SqlExpressionFactoryDependencies.cs +++ b/src/EFCore.Relational/Query/SqlExpressionFactoryDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -31,28 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record SqlExpressionFactoryDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public SqlExpressionFactoryDependencies(IModel model, IRelationalTypeMappingSource typeMappingSource) { diff --git a/src/EFCore.Relational/Query/SqlExpressions/ProjectionExpression.cs b/src/EFCore.Relational/Query/SqlExpressions/ProjectionExpression.cs index 7911d6de388..f336a524777 100644 --- a/src/EFCore.Relational/Query/SqlExpressions/ProjectionExpression.cs +++ b/src/EFCore.Relational/Query/SqlExpressions/ProjectionExpression.cs @@ -8,15 +8,13 @@ namespace Microsoft.EntityFrameworkCore.Query.SqlExpressions { /// - /// - /// An expression that represents a projection in . - /// - /// - /// This is a simple wrapper around a and an alias. - /// Instances of this type cannot be constructed by application or database provider code. If this is a problem for your - /// application or provider, then please file an issue at https://github.com/dotnet/efcore. - /// + /// An expression that represents a projection in . /// + /// + /// This is a simple wrapper around a and an alias. + /// Instances of this type cannot be constructed by application or database provider code. If this is a problem for your + /// application or provider, then please file an issue at https://github.com/dotnet/efcore. + /// public sealed class ProjectionExpression : Expression, IPrintableExpression { internal ProjectionExpression(SqlExpression expression, string alias) diff --git a/src/EFCore.Relational/Query/SqlExpressions/SelectExpression.cs b/src/EFCore.Relational/Query/SqlExpressions/SelectExpression.cs index b58450d0277..040f879d34c 100644 --- a/src/EFCore.Relational/Query/SqlExpressions/SelectExpression.cs +++ b/src/EFCore.Relational/Query/SqlExpressions/SelectExpression.cs @@ -24,11 +24,11 @@ namespace Microsoft.EntityFrameworkCore.Query.SqlExpressions /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// - /// - /// This class is not publicly constructable. If this is a problem for your application or provider, then please file - /// an issue at https://github.com/dotnet/efcore. - /// /// + /// + /// This class is not publicly constructable. If this is a problem for your application or provider, then please file + /// an issue at https://github.com/dotnet/efcore. + /// // Class is sealed because there are no public/protected constructors. Can be unsealed if this is changed. public sealed partial class SelectExpression : TableExpressionBase { @@ -558,11 +558,11 @@ static void UpdateLimit(SelectExpression selectExpression) typeof(InvalidOperationException).GetConstructors() .Single( ci => - { - var parameters = ci.GetParameters(); - return parameters.Length == 1 - && parameters[0].ParameterType == typeof(string); - }), + { + var parameters = ci.GetParameters(); + return parameters.Length == 1 + && parameters[0].ParameterType == typeof(string); + }), Constant(CoreStrings.SequenceContainsNoElements))), Default(innerShaperExpression.Type)); @@ -1876,10 +1876,10 @@ static TableReferenceExpression FindTableReference(SelectExpression selectExpres tableExpressionBase = selectExpression.Tables .First( e => - { - var t = (TableExpression)UnwrapJoinExpression(e); - return t.Name == table.Name && t.Schema == table.Schema; - }); + { + var t = (TableExpression)UnwrapJoinExpression(e); + return t.Name == table.Name && t.Schema == table.Schema; + }); } var propertyExpressions = new Dictionary(); diff --git a/src/EFCore.Relational/Query/SqlExpressions/SqlParameterExpression.cs b/src/EFCore.Relational/Query/SqlExpressions/SqlParameterExpression.cs index bbdab36e551..71eb25d4281 100644 --- a/src/EFCore.Relational/Query/SqlExpressions/SqlParameterExpression.cs +++ b/src/EFCore.Relational/Query/SqlExpressions/SqlParameterExpression.cs @@ -9,15 +9,13 @@ namespace Microsoft.EntityFrameworkCore.Query.SqlExpressions { /// - /// - /// An expression that represents a parameter in a SQL tree. - /// - /// - /// This is a simple wrapper around a in the SQL tree. - /// Instances of this type cannot be constructed by application or database provider code. If this is a problem for your - /// application or provider, then please file an issue at https://github.com/dotnet/efcore. - /// + /// An expression that represents a parameter in a SQL tree. /// + /// + /// This is a simple wrapper around a in the SQL tree. + /// Instances of this type cannot be constructed by application or database provider code. If this is a problem for your + /// application or provider, then please file an issue at https://github.com/dotnet/efcore. + /// public sealed class SqlParameterExpression : SqlExpression { private readonly ParameterExpression _parameterExpression; diff --git a/src/EFCore.Relational/Query/SqlExpressions/TableExpression.cs b/src/EFCore.Relational/Query/SqlExpressions/TableExpression.cs index 2c33e4c358a..c6781bdcb24 100644 --- a/src/EFCore.Relational/Query/SqlExpressions/TableExpression.cs +++ b/src/EFCore.Relational/Query/SqlExpressions/TableExpression.cs @@ -9,15 +9,13 @@ namespace Microsoft.EntityFrameworkCore.Query.SqlExpressions { /// - /// - /// An expression that represents a table or view in a SQL tree. - /// - /// - /// This is a simple wrapper around a table and schema name. Instances of this type cannot be constructed by - /// application or database provider code. If this is a problem for your application or provider, then please file - /// an issue at https://github.com/dotnet/efcore. - /// + /// An expression that represents a table or view in a SQL tree. /// + /// + /// This is a simple wrapper around a table and schema name. Instances of this type cannot be constructed by + /// application or database provider code. If this is a problem for your application or provider, then please file + /// an issue at https://github.com/dotnet/efcore. + /// public sealed class TableExpression : TableExpressionBase, IClonableTableExpressionBase { internal TableExpression(ITableBase table) diff --git a/src/EFCore.Relational/QuerySplittingBehavior.cs b/src/EFCore.Relational/QuerySplittingBehavior.cs index 44900144308..231a8d74bdb 100644 --- a/src/EFCore.Relational/QuerySplittingBehavior.cs +++ b/src/EFCore.Relational/QuerySplittingBehavior.cs @@ -12,28 +12,24 @@ namespace Microsoft.EntityFrameworkCore public enum QuerySplittingBehavior { /// - /// - /// The related collections will be loaded in same database query as parent query. - /// - /// - /// This behavior generally guarantees result consistency in the face of concurrent updates - /// (but details may vary based on the database and transaction isolation level in use). - /// However, this can cause performance issues when the query loads multiple related collections. - /// + /// The related collections will be loaded in same database query as parent query. /// + /// + /// This behavior generally guarantees result consistency in the face of concurrent updates + /// (but details may vary based on the database and transaction isolation level in use). + /// However, this can cause performance issues when the query loads multiple related collections. + /// SingleQuery = 0, /// - /// - /// The related collections will be loaded in separate database queries from the parent query. - /// - /// - /// This behavior can significantly improve performance when the query loads multiple collections. - /// However, since separate queries are used, this can result in inconsistent results when concurrent updates occur. - /// Serializable or snapshot transactions can be used to mitigate this - /// and achieve consistency with split queries, but that may bring other performance costs and behavioral difference. - /// + /// The related collections will be loaded in separate database queries from the parent query. /// + /// + /// This behavior can significantly improve performance when the query loads multiple collections. + /// However, since separate queries are used, this can result in inconsistent results when concurrent updates occur. + /// Serializable or snapshot transactions can be used to mitigate this + /// and achieve consistency with split queries, but that may bring other performance costs and behavioral difference. + /// SplitQuery } } diff --git a/src/EFCore.Relational/Scaffolding/ProviderCodeGeneratorDependencies.cs b/src/EFCore.Relational/Scaffolding/ProviderCodeGeneratorDependencies.cs index cf892f52c98..c129f276896 100644 --- a/src/EFCore.Relational/Scaffolding/ProviderCodeGeneratorDependencies.cs +++ b/src/EFCore.Relational/Scaffolding/ProviderCodeGeneratorDependencies.cs @@ -27,24 +27,19 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding public sealed record ProviderCodeGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ProviderCodeGeneratorDependencies(IEnumerable plugins) { diff --git a/src/EFCore.Relational/Storage/IParameterNameGeneratorFactory.cs b/src/EFCore.Relational/Storage/IParameterNameGeneratorFactory.cs index 214278a7124..1e9072cf090 100644 --- a/src/EFCore.Relational/Storage/IParameterNameGeneratorFactory.cs +++ b/src/EFCore.Relational/Storage/IParameterNameGeneratorFactory.cs @@ -13,15 +13,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IParameterNameGeneratorFactory { diff --git a/src/EFCore.Relational/Storage/IRawSqlCommandBuilder.cs b/src/EFCore.Relational/Storage/IRawSqlCommandBuilder.cs index eb4682b6dab..6ae27959543 100644 --- a/src/EFCore.Relational/Storage/IRawSqlCommandBuilder.cs +++ b/src/EFCore.Relational/Storage/IRawSqlCommandBuilder.cs @@ -14,15 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IRawSqlCommandBuilder { diff --git a/src/EFCore.Relational/Storage/IRelationalCommandBuilderFactory.cs b/src/EFCore.Relational/Storage/IRelationalCommandBuilderFactory.cs index f58008f963b..f23809df887 100644 --- a/src/EFCore.Relational/Storage/IRelationalCommandBuilderFactory.cs +++ b/src/EFCore.Relational/Storage/IRelationalCommandBuilderFactory.cs @@ -13,15 +13,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IRelationalCommandBuilderFactory { diff --git a/src/EFCore.Relational/Storage/IRelationalConnection.cs b/src/EFCore.Relational/Storage/IRelationalConnection.cs index a745bb07228..2d73c2820dd 100644 --- a/src/EFCore.Relational/Storage/IRelationalConnection.cs +++ b/src/EFCore.Relational/Storage/IRelationalConnection.cs @@ -18,16 +18,18 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IRelationalConnection : IRelationalTransactionManager, IDisposable, IAsyncDisposable { @@ -37,16 +39,16 @@ public interface IRelationalConnection : IRelationalTransactionManager, IDisposa string? ConnectionString { get; set; } /// - /// - /// Gets or sets the underlying used to connect to the database. - /// + /// Gets or sets the underlying used to connect to the database. + /// + /// /// /// The connection can only be changed when the existing connection, if any, is not open. /// /// /// Note that the connection must be disposed by application code since it was not created by Entity Framework. /// - /// + /// [AllowNull] DbConnection DbConnection { get; set; } diff --git a/src/EFCore.Relational/Storage/IRelationalDatabaseCreator.cs b/src/EFCore.Relational/Storage/IRelationalDatabaseCreator.cs index 8396f0a0a74..f430e516025 100644 --- a/src/EFCore.Relational/Storage/IRelationalDatabaseCreator.cs +++ b/src/EFCore.Relational/Storage/IRelationalDatabaseCreator.cs @@ -16,16 +16,18 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IRelationalDatabaseCreator : IDatabaseCreator { diff --git a/src/EFCore.Relational/Storage/IRelationalDatabaseFacadeDependencies.cs b/src/EFCore.Relational/Storage/IRelationalDatabaseFacadeDependencies.cs index 81c79d5f1b8..9f1dcef67f6 100644 --- a/src/EFCore.Relational/Storage/IRelationalDatabaseFacadeDependencies.cs +++ b/src/EFCore.Relational/Storage/IRelationalDatabaseFacadeDependencies.cs @@ -15,16 +15,18 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IRelationalDatabaseFacadeDependencies : IDatabaseFacadeDependencies { diff --git a/src/EFCore.Relational/Storage/IRelationalTransactionFactory.cs b/src/EFCore.Relational/Storage/IRelationalTransactionFactory.cs index 9223bbb8cd7..241dad6c9e3 100644 --- a/src/EFCore.Relational/Storage/IRelationalTransactionFactory.cs +++ b/src/EFCore.Relational/Storage/IRelationalTransactionFactory.cs @@ -15,15 +15,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// /// This type is typically used by database providers It is generally not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IRelationalTransactionFactory { diff --git a/src/EFCore.Relational/Storage/IRelationalTransactionManager.cs b/src/EFCore.Relational/Storage/IRelationalTransactionManager.cs index fdb20493255..d1b0844db24 100644 --- a/src/EFCore.Relational/Storage/IRelationalTransactionManager.cs +++ b/src/EFCore.Relational/Storage/IRelationalTransactionManager.cs @@ -18,16 +18,18 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IRelationalTransactionManager : IDbContextTransactionManager { diff --git a/src/EFCore.Relational/Storage/IRelationalTypeMappingSource.cs b/src/EFCore.Relational/Storage/IRelationalTypeMappingSource.cs index 82b9d8ec293..7535afa1457 100644 --- a/src/EFCore.Relational/Storage/IRelationalTypeMappingSource.cs +++ b/src/EFCore.Relational/Storage/IRelationalTypeMappingSource.cs @@ -10,25 +10,26 @@ namespace Microsoft.EntityFrameworkCore.Storage { /// /// - /// The relational type mapping source. Type mappings describe how a - /// provider maps CLR types/values to database types/values. - /// - /// - /// Warning: do not implement this interface directly. Instead, derive from . + /// The relational type mapping source. Type mappings describe how a provider maps CLR types/values to database types/values. /// /// /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// /// + /// Warning: do not implement this interface directly. Instead, derive from . + /// + /// + /// + /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IRelationalTypeMappingSource : ITypeMappingSource { @@ -40,69 +41,59 @@ public interface IRelationalTypeMappingSource : ITypeMappingSource new RelationalTypeMapping? FindMapping(IProperty property); /// - /// - /// Finds the type mapping for a given representing - /// a field or a property of a CLR type. - /// - /// - /// Note: Only call this method if there is no available, otherwise - /// call - /// + /// Finds the type mapping for a given representing + /// a field or a property of a CLR type. /// + /// + /// Note: Only call this method if there is no available, otherwise + /// call + /// /// The field or property. /// The type mapping, or if none was found. new RelationalTypeMapping? FindMapping(MemberInfo member); /// - /// - /// Finds the type mapping for a given . - /// - /// - /// Note: Only call this method if there is no - /// or available, otherwise call - /// or - /// + /// Finds the type mapping for a given . /// + /// + /// Note: Only call this method if there is no + /// or available, otherwise call + /// or + /// /// The CLR type. /// The type mapping, or if none was found. new RelationalTypeMapping? FindMapping(Type type); /// - /// - /// Finds the type mapping for a given , taking pre-convention configuration into the account. - /// - /// - /// Note: Only call this method if there is no , - /// otherwise call . - /// + /// Finds the type mapping for a given , taking pre-convention configuration into the account. /// + /// + /// Note: Only call this method if there is no , + /// otherwise call . + /// /// The CLR type. /// The model. /// The type mapping, or if none was found. new RelationalTypeMapping? FindMapping(Type type, IModel model); /// - /// - /// Finds the type mapping for a given database type name. - /// - /// - /// Note: Only call this method if there is no available, otherwise - /// call - /// + /// Finds the type mapping for a given database type name. /// + /// + /// Note: Only call this method if there is no available, otherwise + /// call + /// /// The database type name. /// The type mapping, or if none was found. RelationalTypeMapping? FindMapping(string storeTypeName); /// - /// - /// Finds the type mapping for a given and additional facets. - /// - /// - /// Note: Only call this method if there is no available, otherwise - /// call - /// + /// Finds the type mapping for a given and additional facets. /// + /// + /// Note: Only call this method if there is no available, otherwise + /// call + /// /// The CLR type. /// The database type name. /// If , then a special mapping for a key or index may be returned. diff --git a/src/EFCore.Relational/Storage/IRelationalTypeMappingSourcePlugin.cs b/src/EFCore.Relational/Storage/IRelationalTypeMappingSourcePlugin.cs index f8bab09998b..c41d53d7152 100644 --- a/src/EFCore.Relational/Storage/IRelationalTypeMappingSourcePlugin.cs +++ b/src/EFCore.Relational/Storage/IRelationalTypeMappingSourcePlugin.cs @@ -6,19 +6,19 @@ namespace Microsoft.EntityFrameworkCore.Storage { /// - /// - /// Represents a plugin relational type mapping source. - /// + /// Represents a plugin relational type mapping source. + /// + /// /// /// The service lifetime is and multiple registrations /// are allowed. This means a single instance of each service is used by many /// instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IRelationalTypeMappingSourcePlugin { diff --git a/src/EFCore.Relational/Storage/IRelationalValueBufferFactoryFactory.cs b/src/EFCore.Relational/Storage/IRelationalValueBufferFactoryFactory.cs index bc10acb5baa..39bcd291eb0 100644 --- a/src/EFCore.Relational/Storage/IRelationalValueBufferFactoryFactory.cs +++ b/src/EFCore.Relational/Storage/IRelationalValueBufferFactoryFactory.cs @@ -16,15 +16,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IRelationalValueBufferFactoryFactory { diff --git a/src/EFCore.Relational/Storage/ISqlGenerationHelper.cs b/src/EFCore.Relational/Storage/ISqlGenerationHelper.cs index ff4697631f7..608ef908530 100644 --- a/src/EFCore.Relational/Storage/ISqlGenerationHelper.cs +++ b/src/EFCore.Relational/Storage/ISqlGenerationHelper.cs @@ -14,15 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface ISqlGenerationHelper { diff --git a/src/EFCore.Relational/Storage/Internal/INamedConnectionStringResolver.cs b/src/EFCore.Relational/Storage/Internal/INamedConnectionStringResolver.cs index e7f89bff923..35da7a0f163 100644 --- a/src/EFCore.Relational/Storage/Internal/INamedConnectionStringResolver.cs +++ b/src/EFCore.Relational/Storage/Internal/INamedConnectionStringResolver.cs @@ -6,19 +6,17 @@ namespace Microsoft.EntityFrameworkCore.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface INamedConnectionStringResolver { /// diff --git a/src/EFCore.Relational/Storage/Internal/NamedConnectionStringResolver.cs b/src/EFCore.Relational/Storage/Internal/NamedConnectionStringResolver.cs index 9c5c12a6d74..3e1cd4fa7a7 100644 --- a/src/EFCore.Relational/Storage/Internal/NamedConnectionStringResolver.cs +++ b/src/EFCore.Relational/Storage/Internal/NamedConnectionStringResolver.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class NamedConnectionStringResolver : NamedConnectionStringResolverBase, INamedConnectionStringResolver { private readonly IDbContextOptions _options; diff --git a/src/EFCore.Relational/Storage/Internal/NamedConnectionStringResolverBase.cs b/src/EFCore.Relational/Storage/Internal/NamedConnectionStringResolverBase.cs index 9aa550290f2..52c12a3b704 100644 --- a/src/EFCore.Relational/Storage/Internal/NamedConnectionStringResolverBase.cs +++ b/src/EFCore.Relational/Storage/Internal/NamedConnectionStringResolverBase.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 abstract class NamedConnectionStringResolverBase { private const string DefaultSection = "ConnectionStrings:"; diff --git a/src/EFCore.Relational/Storage/Internal/RawSqlCommandBuilder.cs b/src/EFCore.Relational/Storage/Internal/RawSqlCommandBuilder.cs index 2c102ef0d63..a98f535fdc9 100644 --- a/src/EFCore.Relational/Storage/Internal/RawSqlCommandBuilder.cs +++ b/src/EFCore.Relational/Storage/Internal/RawSqlCommandBuilder.cs @@ -9,18 +9,16 @@ namespace Microsoft.EntityFrameworkCore.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class RawSqlCommandBuilder : IRawSqlCommandBuilder { private readonly IRelationalCommandBuilderFactory _relationalCommandBuilderFactory; diff --git a/src/EFCore.Relational/Storage/ParameterNameGeneratorDependencies.cs b/src/EFCore.Relational/Storage/ParameterNameGeneratorDependencies.cs index 974d215eafb..99bd56123e8 100644 --- a/src/EFCore.Relational/Storage/ParameterNameGeneratorDependencies.cs +++ b/src/EFCore.Relational/Storage/ParameterNameGeneratorDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -28,28 +30,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record ParameterNameGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ParameterNameGeneratorDependencies() { diff --git a/src/EFCore.Relational/Storage/ParameterNameGeneratorFactory.cs b/src/EFCore.Relational/Storage/ParameterNameGeneratorFactory.cs index 6726db2b5b0..0943fe3dd21 100644 --- a/src/EFCore.Relational/Storage/ParameterNameGeneratorFactory.cs +++ b/src/EFCore.Relational/Storage/ParameterNameGeneratorFactory.cs @@ -14,15 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class ParameterNameGeneratorFactory : IParameterNameGeneratorFactory { diff --git a/src/EFCore.Relational/Storage/RelationalCommandBuilderDependencies.cs b/src/EFCore.Relational/Storage/RelationalCommandBuilderDependencies.cs index 391d6b2db17..3940e073dd9 100644 --- a/src/EFCore.Relational/Storage/RelationalCommandBuilderDependencies.cs +++ b/src/EFCore.Relational/Storage/RelationalCommandBuilderDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -28,28 +30,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record RelationalCommandBuilderDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalCommandBuilderDependencies( IRelationalTypeMappingSource typeMappingSource) diff --git a/src/EFCore.Relational/Storage/RelationalCommandBuilderFactory.cs b/src/EFCore.Relational/Storage/RelationalCommandBuilderFactory.cs index e8296fcad44..6dbb4f935a3 100644 --- a/src/EFCore.Relational/Storage/RelationalCommandBuilderFactory.cs +++ b/src/EFCore.Relational/Storage/RelationalCommandBuilderFactory.cs @@ -14,15 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class RelationalCommandBuilderFactory : IRelationalCommandBuilderFactory { diff --git a/src/EFCore.Relational/Storage/RelationalConnection.cs b/src/EFCore.Relational/Storage/RelationalConnection.cs index e939e3b056c..74628e55290 100644 --- a/src/EFCore.Relational/Storage/RelationalConnection.cs +++ b/src/EFCore.Relational/Storage/RelationalConnection.cs @@ -28,16 +28,18 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public abstract class RelationalConnection : IRelationalConnection, ITransactionEnlistmentManager { @@ -146,16 +148,16 @@ protected virtual string GetValidatedConnectionString() } /// - /// - /// Gets or sets the underlying used to connect to the database. - /// + /// Gets or sets the underlying used to connect to the database. + /// + /// /// /// The connection can only be changed when the existing connection, if any, is not open. /// /// /// Note that a connection set must be disposed by application code since it was not created by Entity Framework. /// - /// + /// [AllowNull] public virtual DbConnection DbConnection { diff --git a/src/EFCore.Relational/Storage/RelationalConnectionDependencies.cs b/src/EFCore.Relational/Storage/RelationalConnectionDependencies.cs index 0864cc4b682..540fb820684 100644 --- a/src/EFCore.Relational/Storage/RelationalConnectionDependencies.cs +++ b/src/EFCore.Relational/Storage/RelationalConnectionDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -31,28 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalConnectionDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalConnectionDependencies( IDbContextOptions contextOptions, diff --git a/src/EFCore.Relational/Storage/RelationalDatabase.cs b/src/EFCore.Relational/Storage/RelationalDatabase.cs index 528e3d3b09c..028dda524e6 100644 --- a/src/EFCore.Relational/Storage/RelationalDatabase.cs +++ b/src/EFCore.Relational/Storage/RelationalDatabase.cs @@ -19,16 +19,18 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class RelationalDatabase : Database { diff --git a/src/EFCore.Relational/Storage/RelationalDatabaseCreator.cs b/src/EFCore.Relational/Storage/RelationalDatabaseCreator.cs index 21f1eee7cad..9ce0d9a4641 100644 --- a/src/EFCore.Relational/Storage/RelationalDatabaseCreator.cs +++ b/src/EFCore.Relational/Storage/RelationalDatabaseCreator.cs @@ -23,16 +23,18 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public abstract class RelationalDatabaseCreator : IRelationalDatabaseCreator { @@ -187,7 +189,7 @@ public virtual Task HasTablesAsync(CancellationToken cancellationToken = d /// exist then the database is deleted. /// /// - /// Warning: The entire database is deleted an no effort is made to remove just the database objects that are used by + /// Warning: The entire database is deleted and no effort is made to remove just the database objects that are used by /// the model for this context. /// /// @@ -211,7 +213,7 @@ public virtual bool EnsureDeleted() /// exist then the database is deleted. /// /// - /// Warning: The entire database is deleted an no effort is made to remove just the database objects that are used by + /// Warning: The entire database is deleted and no effort is made to remove just the database objects that are used by /// the model for this context. /// /// @@ -322,9 +324,9 @@ public virtual string GenerateCreateScript() } /// - /// - /// Determines whether or not the database is available and can be connected to. - /// + /// Determines whether or not the database is available and can be connected to. + /// + /// /// /// Any exceptions thrown when attempting to connect are caught and not propagated to the application. /// @@ -336,7 +338,7 @@ public virtual string GenerateCreateScript() /// Note that being able to connect to the database does not mean that it is /// up-to-date with regard to schema creation, etc. /// - /// + /// /// if the database is available; otherwise. public virtual bool CanConnect() { @@ -351,9 +353,9 @@ public virtual bool CanConnect() } /// - /// - /// Determines whether or not the database is available and can be connected to. - /// + /// Determines whether or not the database is available and can be connected to. + /// + /// /// /// Any exceptions thrown when attempting to connect are caught and not propagated to the application. /// @@ -365,7 +367,7 @@ public virtual bool CanConnect() /// Note that being able to connect to the database does not mean that it is /// up-to-date with regard to schema creation, etc. /// - /// + /// /// A to observe while waiting for the task to complete. /// if the database is available; otherwise. /// If the is canceled. diff --git a/src/EFCore.Relational/Storage/RelationalDatabaseCreatorDependencies.cs b/src/EFCore.Relational/Storage/RelationalDatabaseCreatorDependencies.cs index cf1c03455dd..f302b29f89e 100644 --- a/src/EFCore.Relational/Storage/RelationalDatabaseCreatorDependencies.cs +++ b/src/EFCore.Relational/Storage/RelationalDatabaseCreatorDependencies.cs @@ -18,6 +18,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -32,34 +34,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalDatabaseCreatorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalDatabaseCreatorDependencies( IModel model, diff --git a/src/EFCore.Relational/Storage/RelationalDatabaseDependencies.cs b/src/EFCore.Relational/Storage/RelationalDatabaseDependencies.cs index 4f2049aa250..a63697c4dc6 100644 --- a/src/EFCore.Relational/Storage/RelationalDatabaseDependencies.cs +++ b/src/EFCore.Relational/Storage/RelationalDatabaseDependencies.cs @@ -16,6 +16,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -30,28 +32,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RelationalDatabaseDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalDatabaseDependencies( ICommandBatchPreparer batchPreparer, diff --git a/src/EFCore.Relational/Storage/RelationalExecutionStrategyFactory.cs b/src/EFCore.Relational/Storage/RelationalExecutionStrategyFactory.cs index 809228a044c..a9a1f9ee956 100644 --- a/src/EFCore.Relational/Storage/RelationalExecutionStrategyFactory.cs +++ b/src/EFCore.Relational/Storage/RelationalExecutionStrategyFactory.cs @@ -9,20 +9,20 @@ namespace Microsoft.EntityFrameworkCore.Storage { /// - /// - /// Factory for creating instances for use with relational - /// database providers. - /// + /// Factory for creating instances for use with relational + /// database providers. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class RelationalExecutionStrategyFactory : IExecutionStrategyFactory { diff --git a/src/EFCore.Relational/Storage/RelationalSqlGenerationHelper.cs b/src/EFCore.Relational/Storage/RelationalSqlGenerationHelper.cs index 158a9699d08..3e6376ab704 100644 --- a/src/EFCore.Relational/Storage/RelationalSqlGenerationHelper.cs +++ b/src/EFCore.Relational/Storage/RelationalSqlGenerationHelper.cs @@ -17,15 +17,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class RelationalSqlGenerationHelper : ISqlGenerationHelper { diff --git a/src/EFCore.Relational/Storage/RelationalSqlGenerationHelperDependencies.cs b/src/EFCore.Relational/Storage/RelationalSqlGenerationHelperDependencies.cs index cb2a6f299fc..a5e64439a4b 100644 --- a/src/EFCore.Relational/Storage/RelationalSqlGenerationHelperDependencies.cs +++ b/src/EFCore.Relational/Storage/RelationalSqlGenerationHelperDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -28,28 +30,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record RelationalSqlGenerationHelperDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalSqlGenerationHelperDependencies() { diff --git a/src/EFCore.Relational/Storage/RelationalTransaction.cs b/src/EFCore.Relational/Storage/RelationalTransaction.cs index 9c336b2380a..c2753bc59e8 100644 --- a/src/EFCore.Relational/Storage/RelationalTransaction.cs +++ b/src/EFCore.Relational/Storage/RelationalTransaction.cs @@ -13,16 +13,16 @@ namespace Microsoft.EntityFrameworkCore.Storage { /// - /// - /// A transaction against the database. - /// + /// A transaction against the database. + /// + /// /// /// Instances of this class are typically obtained from and it is not designed /// to be directly constructed in your application code. /// - /// - /// - /// See Transactions in EF Core for more information. + /// + /// See Transactions in EF Core for more information. + /// /// public class RelationalTransaction : IDbContextTransaction, IInfrastructure { diff --git a/src/EFCore.Relational/Storage/RelationalTransactionFactory.cs b/src/EFCore.Relational/Storage/RelationalTransactionFactory.cs index b47df00d9e6..d0a4011ad30 100644 --- a/src/EFCore.Relational/Storage/RelationalTransactionFactory.cs +++ b/src/EFCore.Relational/Storage/RelationalTransactionFactory.cs @@ -14,17 +14,19 @@ namespace Microsoft.EntityFrameworkCore.Storage /// A factory for creating instances. /// /// - /// This type is typically used by database providers It is generally not used in application code. + /// This type is typically used by database providers. It is generally not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class RelationalTransactionFactory : IRelationalTransactionFactory { diff --git a/src/EFCore.Relational/Storage/RelationalTransactionFactoryDependencies.cs b/src/EFCore.Relational/Storage/RelationalTransactionFactoryDependencies.cs index a8b8dd41b2f..c7ad7251f00 100644 --- a/src/EFCore.Relational/Storage/RelationalTransactionFactoryDependencies.cs +++ b/src/EFCore.Relational/Storage/RelationalTransactionFactoryDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -29,28 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record RelationalTransactionFactoryDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalTransactionFactoryDependencies(ISqlGenerationHelper sqlGenerationHelper) { diff --git a/src/EFCore.Relational/Storage/RelationalTypeMappingSource.cs b/src/EFCore.Relational/Storage/RelationalTypeMappingSource.cs index ebab1c43355..f06f502d8ff 100644 --- a/src/EFCore.Relational/Storage/RelationalTypeMappingSource.cs +++ b/src/EFCore.Relational/Storage/RelationalTypeMappingSource.cs @@ -25,15 +25,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public abstract class RelationalTypeMappingSource : TypeMappingSourceBase, IRelationalTypeMappingSource { @@ -56,15 +58,13 @@ protected RelationalTypeMappingSource( } /// - /// - /// Overridden by relational database providers to find a type mapping for the given info. - /// - /// - /// The mapping info is populated with as much information about the required type mapping as - /// is available. Use all the information necessary to create the best mapping. Return - /// if no mapping is available. - /// + /// Overridden by relational database providers to find a type mapping for the given info. /// + /// + /// The mapping info is populated with as much information about the required type mapping as + /// is available. Use all the information necessary to create the best mapping. Return + /// if no mapping is available. + /// /// The mapping info to use to create the mapping. /// The type mapping, or if none could be found. protected virtual RelationalTypeMapping? FindMapping(in RelationalTypeMappingInfo mappingInfo) @@ -140,69 +140,67 @@ protected override CoreTypeMapping FindMapping(in TypeMappingInfo mappingInfo) => _explicitMappings.GetOrAdd( (mappingInfo, providerClrType, customConverter), k => + { + var (info, providerType, converter) = k; + var mapping = providerType == null + || providerType == info.ClrType + ? FindMapping(info) + : null; + + if (mapping == null) { - var (info, providerType, converter) = k; - var mapping = providerType == null - || providerType == info.ClrType - ? FindMapping(info) - : null; + var sourceType = info.ClrType; - if (mapping == null) + if (sourceType != null) { - var sourceType = info.ClrType; - - if (sourceType != null) + foreach (var converterInfo in Dependencies + .ValueConverterSelector + .Select(sourceType, providerType)) { - foreach (var converterInfo in Dependencies - .ValueConverterSelector - .Select(sourceType, providerType)) - { - var mappingInfoUsed = info.WithConverter(converterInfo); - mapping = FindMapping(mappingInfoUsed); + var mappingInfoUsed = info.WithConverter(converterInfo); + mapping = FindMapping(mappingInfoUsed); - if (mapping == null - && providerType != null) + if (mapping == null + && providerType != null) + { + foreach (var secondConverterInfo in Dependencies + .ValueConverterSelector + .Select(providerType)) { - foreach (var secondConverterInfo in Dependencies - .ValueConverterSelector - .Select(providerType)) - { - mapping = FindMapping(mappingInfoUsed.WithConverter(secondConverterInfo)); + mapping = FindMapping(mappingInfoUsed.WithConverter(secondConverterInfo)); - if (mapping != null) - { - mapping = (RelationalTypeMapping)mapping.Clone(secondConverterInfo.Create()); - break; - } + if (mapping != null) + { + mapping = (RelationalTypeMapping)mapping.Clone(secondConverterInfo.Create()); + break; } } + } - if (mapping != null) - { - mapping = (RelationalTypeMapping)mapping.Clone(converterInfo.Create()); - break; - } + if (mapping != null) + { + mapping = (RelationalTypeMapping)mapping.Clone(converterInfo.Create()); + break; } } } + } - if (mapping != null - && converter != null) - { - mapping = (RelationalTypeMapping)mapping.Clone(converter); - } + if (mapping != null + && converter != null) + { + mapping = (RelationalTypeMapping)mapping.Clone(converter); + } - return mapping; - }); + return mapping; + }); /// - /// - /// Finds the type mapping for a given . - /// - /// - /// Note: providers should typically not need to override this method. - /// + /// Finds the type mapping for a given . /// + /// + /// Note: providers should typically not need to override this method. + /// /// The property. /// The type mapping, or if none was found. public override CoreTypeMapping? FindMapping(IProperty property) @@ -238,9 +236,9 @@ protected override CoreTypeMapping FindMapping(in TypeMappingInfo mappingInfo) } /// - /// - /// Finds the type mapping for a given . - /// + /// Finds the type mapping for a given . + /// + /// /// /// Note: Only call this method if there is no /// or available, otherwise call @@ -249,21 +247,19 @@ protected override CoreTypeMapping FindMapping(in TypeMappingInfo mappingInfo) /// /// Note: providers should typically not need to override this method. /// - /// + /// /// The CLR type. /// The type mapping, or if none was found. public override RelationalTypeMapping? FindMapping(Type type) => FindMappingWithConversion(new RelationalTypeMappingInfo(type), null); /// - /// - /// Finds the type mapping for a given , taking pre-convention configuration into the account. - /// - /// - /// Note: Only call this method if there is no , - /// otherwise call . - /// + /// Finds the type mapping for a given , taking pre-convention configuration into the account. /// + /// + /// Note: Only call this method if there is no , + /// otherwise call . + /// /// The CLR type. /// The model. /// The type mapping, or if none was found. @@ -334,10 +330,10 @@ protected override CoreTypeMapping FindMapping(in TypeMappingInfo mappingInfo) } /// - /// - /// Finds the type mapping for a given representing - /// a field or a property of a CLR type. - /// + /// Finds the type mapping for a given representing + /// a field or a property of a CLR type. + /// + /// /// /// Note: Only call this method if there is no available, otherwise /// call @@ -345,7 +341,7 @@ protected override CoreTypeMapping FindMapping(in TypeMappingInfo mappingInfo) /// /// Note: providers should typically not need to override this method. /// - /// + /// /// The field or property. /// The type mapping, or if none was found. public override RelationalTypeMapping? FindMapping(MemberInfo member) @@ -365,9 +361,9 @@ protected override CoreTypeMapping FindMapping(in TypeMappingInfo mappingInfo) } /// - /// - /// Finds the type mapping for a given database type name. - /// + /// Finds the type mapping for a given database type name. + /// + /// /// /// Note: Only call this method if there is no available, otherwise /// call @@ -375,7 +371,7 @@ protected override CoreTypeMapping FindMapping(in TypeMappingInfo mappingInfo) /// /// Note: providers should typically not need to override this method. /// - /// + /// /// The database type name. /// The type mapping, or if none was found. public virtual RelationalTypeMapping? FindMapping(string storeTypeName) @@ -387,9 +383,9 @@ protected override CoreTypeMapping FindMapping(in TypeMappingInfo mappingInfo) } /// - /// - /// Finds the type mapping for a given and additional facets. - /// + /// Finds the type mapping for a given and additional facets. + /// + /// /// /// Note: Only call this method if there is no available, otherwise /// call @@ -397,7 +393,7 @@ protected override CoreTypeMapping FindMapping(in TypeMappingInfo mappingInfo) /// /// Note: providers should typically not need to override this method. /// - /// + /// /// The CLR type. /// The database type name. /// If , then a special mapping for a key or index may be returned. @@ -456,16 +452,14 @@ protected override CoreTypeMapping FindMapping(in TypeMappingInfo mappingInfo) => (RelationalTypeMapping?)FindMapping(property); /// - /// - /// Parses a provider-specific store type name, extracting the standard facets - /// (e.g. size, precision) and returns the base store type name (without any facets). - /// - /// - /// The default implementation supports sometype(size), sometype(precision) and - /// sometype(precision, scale). Providers can override this to provide their own - /// logic. - /// + /// Parses a provider-specific store type name, extracting the standard facets + /// (e.g. size, precision) and returns the base store type name (without any facets). /// + /// + /// The default implementation supports sometype(size), sometype(precision) and + /// sometype(precision, scale). Providers can override this to provide their own + /// logic. + /// /// A provider-specific relational type name, including facets. /// The Unicode or ANSI setting parsed from the type name, or if none was specified. /// The size parsed from the type name, or if none was specified. diff --git a/src/EFCore.Relational/Storage/RelationalTypeMappingSourceDependencies.cs b/src/EFCore.Relational/Storage/RelationalTypeMappingSourceDependencies.cs index 88a62e92b44..6c454844ada 100644 --- a/src/EFCore.Relational/Storage/RelationalTypeMappingSourceDependencies.cs +++ b/src/EFCore.Relational/Storage/RelationalTypeMappingSourceDependencies.cs @@ -16,6 +16,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -30,28 +32,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record RelationalTypeMappingSourceDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalTypeMappingSourceDependencies( IEnumerable plugins) diff --git a/src/EFCore.Relational/Storage/RelationalTypeMappingSourceExtensions.cs b/src/EFCore.Relational/Storage/RelationalTypeMappingSourceExtensions.cs index 2ab8a974c97..9944053de92 100644 --- a/src/EFCore.Relational/Storage/RelationalTypeMappingSourceExtensions.cs +++ b/src/EFCore.Relational/Storage/RelationalTypeMappingSourceExtensions.cs @@ -121,13 +121,11 @@ public static RelationalTypeMapping GetMapping( } /// - /// - /// Gets the mapping that represents the given database type, throwing if no mapping is found. - /// - /// - /// Note that sometimes the same store type can have different mappings; this method returns the default. - /// + /// Gets the mapping that represents the given database type, throwing if no mapping is found. /// + /// + /// Note that sometimes the same store type can have different mappings; this method returns the default. + /// /// The type mapping source. /// The type to get the mapping for. /// The type mapping to be used. diff --git a/src/EFCore.Relational/Storage/RelationalValueBufferFactoryDependencies.cs b/src/EFCore.Relational/Storage/RelationalValueBufferFactoryDependencies.cs index 0d74d28604d..2fd45ad5231 100644 --- a/src/EFCore.Relational/Storage/RelationalValueBufferFactoryDependencies.cs +++ b/src/EFCore.Relational/Storage/RelationalValueBufferFactoryDependencies.cs @@ -16,6 +16,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -30,33 +32,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record RelationalValueBufferFactoryDependencies { /// - /// - /// Creates the service dependencies parameter object for a - /// implementations. - /// - /// - /// This type is typically used by database providers (and other extensions). It is generally - /// not used in application code. - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RelationalValueBufferFactoryDependencies( IRelationalTypeMappingSource typeMappingSource, diff --git a/src/EFCore.Relational/Storage/TypedRelationalValueBufferFactoryFactory.cs b/src/EFCore.Relational/Storage/TypedRelationalValueBufferFactoryFactory.cs index bc818920c6a..b2ccde0a43d 100644 --- a/src/EFCore.Relational/Storage/TypedRelationalValueBufferFactoryFactory.cs +++ b/src/EFCore.Relational/Storage/TypedRelationalValueBufferFactoryFactory.cs @@ -25,22 +25,24 @@ namespace Microsoft.EntityFrameworkCore.Storage /// for a given result shape. /// /// - /// This factory results in value buffers that use they strongly typed APIs to read back individual values from the - /// underlying . - /// - /// /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// + /// + /// This factory results in value buffers that use they strongly typed APIs to read back individual values from the + /// underlying . + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class TypedRelationalValueBufferFactoryFactory : IRelationalValueBufferFactoryFactory { diff --git a/src/EFCore.Relational/Update/ColumnModification.cs b/src/EFCore.Relational/Update/ColumnModification.cs index bf8cae88fd4..b95b7110673 100644 --- a/src/EFCore.Relational/Update/ColumnModification.cs +++ b/src/EFCore.Relational/Update/ColumnModification.cs @@ -16,16 +16,18 @@ namespace Microsoft.EntityFrameworkCore.Update /// Implementation of interface. /// /// + /// This type is typically used by database providers; it is generally not used in application code. + /// + /// + /// + /// /// Represents an update, insert, or delete operation for a single column. /// contain lists of . /// /// - /// This type is typically used by database providers; it is generally not used in application code. + /// See Implementation of database providers and extensions + /// for more information. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. /// public class ColumnModification : IColumnModification { diff --git a/src/EFCore.Relational/Update/IBatchExecutor.cs b/src/EFCore.Relational/Update/IBatchExecutor.cs index 306a49acad1..9b0ff9d7529 100644 --- a/src/EFCore.Relational/Update/IBatchExecutor.cs +++ b/src/EFCore.Relational/Update/IBatchExecutor.cs @@ -17,16 +17,18 @@ namespace Microsoft.EntityFrameworkCore.Update /// /// This type is typically used by database providers; it is generally not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IBatchExecutor { diff --git a/src/EFCore.Relational/Update/ICommandBatchPreparer.cs b/src/EFCore.Relational/Update/ICommandBatchPreparer.cs index 2966282a3f4..c03d9f8fdf6 100644 --- a/src/EFCore.Relational/Update/ICommandBatchPreparer.cs +++ b/src/EFCore.Relational/Update/ICommandBatchPreparer.cs @@ -14,16 +14,18 @@ namespace Microsoft.EntityFrameworkCore.Update /// /// This type is typically used by database providers; it is generally not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface ICommandBatchPreparer { diff --git a/src/EFCore.Relational/Update/IModificationCommandBatchFactory.cs b/src/EFCore.Relational/Update/IModificationCommandBatchFactory.cs index d8b3f88bc3b..ad6c0b31c0d 100644 --- a/src/EFCore.Relational/Update/IModificationCommandBatchFactory.cs +++ b/src/EFCore.Relational/Update/IModificationCommandBatchFactory.cs @@ -12,16 +12,18 @@ namespace Microsoft.EntityFrameworkCore.Update /// /// This type is typically used by database providers; it is generally not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IModificationCommandBatchFactory { diff --git a/src/EFCore.Relational/Update/IModificationCommandFactory.cs b/src/EFCore.Relational/Update/IModificationCommandFactory.cs index 86cfe83d5ec..2453ab878ab 100644 --- a/src/EFCore.Relational/Update/IModificationCommandFactory.cs +++ b/src/EFCore.Relational/Update/IModificationCommandFactory.cs @@ -12,15 +12,17 @@ namespace Microsoft.EntityFrameworkCore.Update /// /// This type is typically used by database providers; it is generally not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IModificationCommandFactory { diff --git a/src/EFCore.Relational/Update/IUpdateSqlGenerator.cs b/src/EFCore.Relational/Update/IUpdateSqlGenerator.cs index b7f3191a8ba..22efe991ff4 100644 --- a/src/EFCore.Relational/Update/IUpdateSqlGenerator.cs +++ b/src/EFCore.Relational/Update/IUpdateSqlGenerator.cs @@ -14,15 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Update /// /// This type is typically used by database providers; it is generally not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IUpdateSqlGenerator { diff --git a/src/EFCore.Relational/Update/Internal/BatchExecutor.cs b/src/EFCore.Relational/Update/Internal/BatchExecutor.cs index d934fa09417..60be07b7770 100644 --- a/src/EFCore.Relational/Update/Internal/BatchExecutor.cs +++ b/src/EFCore.Relational/Update/Internal/BatchExecutor.cs @@ -14,19 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Update.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class BatchExecutor : IBatchExecutor { private const string SavepointName = "__EFSavePoint"; diff --git a/src/EFCore.Relational/Update/Internal/CommandBatchPreparer.cs b/src/EFCore.Relational/Update/Internal/CommandBatchPreparer.cs index c01fcda628c..90c3963ab50 100644 --- a/src/EFCore.Relational/Update/Internal/CommandBatchPreparer.cs +++ b/src/EFCore.Relational/Update/Internal/CommandBatchPreparer.cs @@ -15,19 +15,17 @@ namespace Microsoft.EntityFrameworkCore.Update.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class CommandBatchPreparer : ICommandBatchPreparer { private readonly int _minBatchSize; diff --git a/src/EFCore.Relational/Update/Internal/CommandBatchPreparerDependencies.cs b/src/EFCore.Relational/Update/Internal/CommandBatchPreparerDependencies.cs index 8f3020d21b2..ec2627b6368 100644 --- a/src/EFCore.Relational/Update/Internal/CommandBatchPreparerDependencies.cs +++ b/src/EFCore.Relational/Update/Internal/CommandBatchPreparerDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Update.Internal /// 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 @@ -31,34 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Update.Internal /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record CommandBatchPreparerDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// 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. - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public CommandBatchPreparerDependencies( IModificationCommandBatchFactory modificationCommandBatchFactory, diff --git a/src/EFCore.Relational/Update/Internal/IKeyValueIndexFactorySource.cs b/src/EFCore.Relational/Update/Internal/IKeyValueIndexFactorySource.cs index f332cc0a44f..587f1c4c763 100644 --- a/src/EFCore.Relational/Update/Internal/IKeyValueIndexFactorySource.cs +++ b/src/EFCore.Relational/Update/Internal/IKeyValueIndexFactorySource.cs @@ -7,18 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Update.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IKeyValueIndexFactorySource { /// diff --git a/src/EFCore.Relational/Update/Internal/KeyValueIndexFactorySource.cs b/src/EFCore.Relational/Update/Internal/KeyValueIndexFactorySource.cs index 34f3c571b68..955f50edcbb 100644 --- a/src/EFCore.Relational/Update/Internal/KeyValueIndexFactorySource.cs +++ b/src/EFCore.Relational/Update/Internal/KeyValueIndexFactorySource.cs @@ -10,18 +10,16 @@ namespace Microsoft.EntityFrameworkCore.Update.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class KeyValueIndexFactorySource : IKeyValueIndexFactorySource { private readonly ConcurrentDictionary _factories = new(); diff --git a/src/EFCore.Relational/Update/Internal/ModificationCommandComparer.cs b/src/EFCore.Relational/Update/Internal/ModificationCommandComparer.cs index 7f1fefe0a31..1811ec7f556 100644 --- a/src/EFCore.Relational/Update/Internal/ModificationCommandComparer.cs +++ b/src/EFCore.Relational/Update/Internal/ModificationCommandComparer.cs @@ -8,18 +8,16 @@ namespace Microsoft.EntityFrameworkCore.Update.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class ModificationCommandComparer : IComparer { /// diff --git a/src/EFCore.Relational/Update/Internal/ModificationCommandFactory.cs b/src/EFCore.Relational/Update/Internal/ModificationCommandFactory.cs index 5790178a573..5cb80335729 100644 --- a/src/EFCore.Relational/Update/Internal/ModificationCommandFactory.cs +++ b/src/EFCore.Relational/Update/Internal/ModificationCommandFactory.cs @@ -4,12 +4,10 @@ namespace Microsoft.EntityFrameworkCore.Update.Internal { /// - /// - /// 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. - /// + /// 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. /// public class ModificationCommandFactory : IModificationCommandFactory { diff --git a/src/EFCore.Relational/Update/ModificationCommandBatchFactoryDependencies.cs b/src/EFCore.Relational/Update/ModificationCommandBatchFactoryDependencies.cs index 606df49fb59..82dffade8ab 100644 --- a/src/EFCore.Relational/Update/ModificationCommandBatchFactoryDependencies.cs +++ b/src/EFCore.Relational/Update/ModificationCommandBatchFactoryDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Update /// 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 @@ -31,28 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Update /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record ModificationCommandBatchFactoryDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ModificationCommandBatchFactoryDependencies( IRelationalCommandBuilderFactory commandBuilderFactory, diff --git a/src/EFCore.Relational/Update/UpdateSqlGenerator.cs b/src/EFCore.Relational/Update/UpdateSqlGenerator.cs index 34d8693e135..9c31e740f92 100644 --- a/src/EFCore.Relational/Update/UpdateSqlGenerator.cs +++ b/src/EFCore.Relational/Update/UpdateSqlGenerator.cs @@ -20,15 +20,17 @@ namespace Microsoft.EntityFrameworkCore.Update /// /// This type is typically used by database providers; it is generally not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public abstract class UpdateSqlGenerator : IUpdateSqlGenerator { @@ -338,19 +340,19 @@ protected virtual void AppendUpdateCommandHeader( operations, (this, name, schema), (sb, o, p) => + { + var (g, n, s) = p; + g.SqlGenerationHelper.DelimitIdentifier(sb, o.ColumnName); + sb.Append(" = "); + if (!o.UseCurrentValueParameter) { - var (g, n, s) = p; - g.SqlGenerationHelper.DelimitIdentifier(sb, o.ColumnName); - sb.Append(" = "); - if (!o.UseCurrentValueParameter) - { - g.AppendSqlLiteral(sb, o, n, s); - } - else - { - g.SqlGenerationHelper.GenerateParameterNamePlaceholder(sb, o.ParameterName); - } - }); + g.AppendSqlLiteral(sb, o, n, s); + } + else + { + g.SqlGenerationHelper.GenerateParameterNamePlaceholder(sb, o.ParameterName); + } + }); } /// @@ -433,24 +435,24 @@ protected virtual void AppendValues( operations, (this, name, schema), (sb, o, p) => + { + if (o.IsWrite) { - if (o.IsWrite) + var (g, n, s) = p; + if (!o.UseCurrentValueParameter) { - var (g, n, s) = p; - if (!o.UseCurrentValueParameter) - { - g.AppendSqlLiteral(sb, o, n, s); - } - else - { - g.SqlGenerationHelper.GenerateParameterNamePlaceholder(sb, o.ParameterName); - } + g.AppendSqlLiteral(sb, o, n, s); } else { - sb.Append("DEFAULT"); + g.SqlGenerationHelper.GenerateParameterNamePlaceholder(sb, o.ParameterName); } - }) + } + else + { + sb.Append("DEFAULT"); + } + }) .Append(')'); } } @@ -500,24 +502,24 @@ protected virtual void AppendWhereAffectedClause( .Append(" AND ") .AppendJoin( operations, (sb, v) => + { + if (v.IsKey) { - if (v.IsKey) + if (!v.IsRead) { - if (!v.IsRead) - { - AppendWhereCondition(sb, v, v.UseOriginalValueParameter); - return true; - } - } - - if (IsIdentityOperation(v)) - { - AppendIdentityWhereCondition(sb, v); + AppendWhereCondition(sb, v, v.UseOriginalValueParameter); return true; } + } + + if (IsIdentityOperation(v)) + { + AppendIdentityWhereCondition(sb, v); + return true; + } - return false; - }, " AND "); + return false; + }, " AND "); } } diff --git a/src/EFCore.Relational/Update/UpdateSqlGeneratorDependencies.cs b/src/EFCore.Relational/Update/UpdateSqlGeneratorDependencies.cs index 9deb2f61592..ab380bc4fac 100644 --- a/src/EFCore.Relational/Update/UpdateSqlGeneratorDependencies.cs +++ b/src/EFCore.Relational/Update/UpdateSqlGeneratorDependencies.cs @@ -16,6 +16,8 @@ namespace Microsoft.EntityFrameworkCore.Update /// 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 @@ -30,34 +32,23 @@ namespace Microsoft.EntityFrameworkCore.Update /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record UpdateSqlGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public UpdateSqlGeneratorDependencies( ISqlGenerationHelper sqlGenerationHelper, diff --git a/src/EFCore.Relational/ValueGeneration/RelationalValueGeneratorSelector.cs b/src/EFCore.Relational/ValueGeneration/RelationalValueGeneratorSelector.cs index 1bc6a202814..80b9485f41c 100644 --- a/src/EFCore.Relational/ValueGeneration/RelationalValueGeneratorSelector.cs +++ b/src/EFCore.Relational/ValueGeneration/RelationalValueGeneratorSelector.cs @@ -17,16 +17,18 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class RelationalValueGeneratorSelector : ValueGeneratorSelector { diff --git a/src/EFCore.SqlServer.NTS/Query/Internal/SqlServerNetTopologySuiteMemberTranslatorPlugin.cs b/src/EFCore.SqlServer.NTS/Query/Internal/SqlServerNetTopologySuiteMemberTranslatorPlugin.cs index fd58b275fc3..704634ae913 100644 --- a/src/EFCore.SqlServer.NTS/Query/Internal/SqlServerNetTopologySuiteMemberTranslatorPlugin.cs +++ b/src/EFCore.SqlServer.NTS/Query/Internal/SqlServerNetTopologySuiteMemberTranslatorPlugin.cs @@ -8,12 +8,10 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Query.Internal { /// - /// - /// 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. - /// + /// 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. /// public class SqlServerNetTopologySuiteMemberTranslatorPlugin : IMemberTranslatorPlugin { diff --git a/src/EFCore.SqlServer.NTS/Query/Internal/SqlServerNetTopologySuiteMethodCallTranslatorPlugin.cs b/src/EFCore.SqlServer.NTS/Query/Internal/SqlServerNetTopologySuiteMethodCallTranslatorPlugin.cs index 017f1e8feb0..fc8288bdf08 100644 --- a/src/EFCore.SqlServer.NTS/Query/Internal/SqlServerNetTopologySuiteMethodCallTranslatorPlugin.cs +++ b/src/EFCore.SqlServer.NTS/Query/Internal/SqlServerNetTopologySuiteMethodCallTranslatorPlugin.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means a single instance of each service is used by many - /// instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means a single instance of each service is used by many + /// instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqlServerNetTopologySuiteMethodCallTranslatorPlugin : IMethodCallTranslatorPlugin { /// diff --git a/src/EFCore.SqlServer.NTS/Storage/Internal/SqlServerNetTopologySuiteTypeMappingSourcePlugin.cs b/src/EFCore.SqlServer.NTS/Storage/Internal/SqlServerNetTopologySuiteTypeMappingSourcePlugin.cs index e04cf4b65b9..3ac2a491cd1 100644 --- a/src/EFCore.SqlServer.NTS/Storage/Internal/SqlServerNetTopologySuiteTypeMappingSourcePlugin.cs +++ b/src/EFCore.SqlServer.NTS/Storage/Internal/SqlServerNetTopologySuiteTypeMappingSourcePlugin.cs @@ -12,26 +12,20 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means a single instance of each service is used by many - /// instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means a single instance of each service is used by many + /// instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqlServerNetTopologySuiteTypeMappingSourcePlugin : IRelationalTypeMappingSourcePlugin { - private readonly HashSet _spatialStoreTypes = new(StringComparer.OrdinalIgnoreCase) - { - "geometry", - "geography" - }; + private readonly HashSet _spatialStoreTypes = new(StringComparer.OrdinalIgnoreCase) { "geometry", "geography" }; private readonly NtsGeometryServices _geometryServices; diff --git a/src/EFCore.SqlServer/Diagnostics/SqlServerEventId.cs b/src/EFCore.SqlServer/Diagnostics/SqlServerEventId.cs index 52bae2587dd..c0f0aa8b7bf 100644 --- a/src/EFCore.SqlServer/Diagnostics/SqlServerEventId.cs +++ b/src/EFCore.SqlServer/Diagnostics/SqlServerEventId.cs @@ -7,19 +7,19 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Event IDs for SQL Server events that correspond to messages logged to an - /// and events sent to a . - /// + /// Event IDs for SQL Server events that correspond to messages logged to an + /// and events sent to a . + /// + /// /// /// These IDs are also used with to configure the /// behavior of warnings. /// - /// - /// - /// See Logging, events, and diagnostics, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. + /// + /// See Logging, events, and diagnostics, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. + /// /// public static class SqlServerEventId { @@ -79,48 +79,48 @@ private static EventId MakeValidationId(Id id) => new((int)id, _validationPrefix + id); /// - /// - /// Decimal column is part of the key. - /// + /// Decimal column is part of the key. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId DecimalTypeKeyWarning = MakeValidationId(Id.DecimalTypeKeyWarning); /// - /// - /// No explicit type for a decimal column. - /// + /// No explicit type for a decimal column. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId DecimalTypeDefaultWarning = MakeValidationId(Id.DecimalTypeDefaultWarning); /// - /// - /// A byte property is set up to use a SQL Server identity column. - /// + /// A byte property is set up to use a SQL Server identity column. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ByteIdentityColumnWarning = MakeValidationId(Id.ByteIdentityColumnWarning); /// - /// - /// There are conflicting value generation methods for a property. - /// + /// There are conflicting value generation methods for a property. + /// + /// /// /// This event is in the category. /// @@ -128,7 +128,7 @@ private static EventId MakeValidationId(Id id) /// This event uses the /// payload when used with a . /// - /// + /// public static readonly EventId ConflictingValueGenerationStrategiesWarning = MakeValidationId(Id.ConflictingValueGenerationStrategiesWarning); @@ -138,14 +138,12 @@ private static EventId MakeTransactionId(Id id) => new((int)id, _transactionPrefix + id); /// - /// - /// Savepoints have been disabled when saving changes with an external transaction, because Multiple Active Result Sets is - /// enabled. - /// - /// - /// This event is in the category. - /// + /// Savepoints have been disabled when saving changes with an external transaction, because Multiple Active Result Sets is + /// enabled. /// + /// + /// This event is in the category. + /// public static readonly EventId SavepointsDisabledBecauseOfMARS = MakeTransactionId(Id.SavepointsDisabledBecauseOfMARS); private static readonly string _scaffoldingPrefix = DbLoggerCategory.Scaffolding.Name + "."; @@ -155,107 +153,141 @@ private static EventId MakeScaffoldingId(Id id) /// /// A column was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId ColumnFound = MakeScaffoldingId(Id.ColumnFound); /// /// A default schema was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId DefaultSchemaFound = MakeScaffoldingId(Id.DefaultSchemaFound); /// /// A type alias was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId TypeAliasFound = MakeScaffoldingId(Id.TypeAliasFound); /// /// The database is missing a schema. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId MissingSchemaWarning = MakeScaffoldingId(Id.MissingSchemaWarning); /// /// The database is missing a table. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId MissingTableWarning = MakeScaffoldingId(Id.MissingTableWarning); /// /// A foreign key references a missing table at the principal end. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId ForeignKeyReferencesMissingPrincipalTableWarning = MakeScaffoldingId(Id.ForeignKeyReferencesMissingPrincipalTableWarning); /// /// A foreign key references a unknown table at the principal end. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId ForeignKeyReferencesUnknownPrincipalTableWarning = MakeScaffoldingId(Id.ForeignKeyReferencesUnknownPrincipalTableWarning); /// /// A table was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId TableFound = MakeScaffoldingId(Id.TableFound); /// /// A sequence was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId SequenceFound = MakeScaffoldingId(Id.SequenceFound); /// /// Primary key was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId PrimaryKeyFound = MakeScaffoldingId(Id.PrimaryKeyFound); /// /// An unique constraint was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId UniqueConstraintFound = MakeScaffoldingId(Id.UniqueConstraintFound); /// /// An index was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId IndexFound = MakeScaffoldingId(Id.IndexFound); /// /// A foreign key was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId ForeignKeyFound = MakeScaffoldingId(Id.ForeignKeyFound); /// /// A principal column referenced by a foreign key was not found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId ForeignKeyPrincipalColumnMissingWarning = MakeScaffoldingId(Id.ForeignKeyPrincipalColumnMissingWarning); /// /// A reflexive foreign key constraint was skipped. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId ReflexiveConstraintIgnored = MakeScaffoldingId(Id.ReflexiveConstraintIgnored); /// /// A duplicate foreign key constraint was skipped. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId DuplicateForeignKeyConstraintIgnored = MakeScaffoldingId(Id.DuplicateForeignKeyConstraintIgnored); /// /// A column was skipped because its database type could not be found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId ColumnWithoutTypeWarning = MakeScaffoldingId(Id.ColumnWithoutTypeWarning); } } diff --git a/src/EFCore.SqlServer/Extensions/SqlServerDatabaseFacadeExtensions.cs b/src/EFCore.SqlServer/Extensions/SqlServerDatabaseFacadeExtensions.cs index 194734376a6..f84c2126f4b 100644 --- a/src/EFCore.SqlServer/Extensions/SqlServerDatabaseFacadeExtensions.cs +++ b/src/EFCore.SqlServer/Extensions/SqlServerDatabaseFacadeExtensions.cs @@ -13,19 +13,19 @@ namespace Microsoft.EntityFrameworkCore public static class SqlServerDatabaseFacadeExtensions { /// - /// - /// Returns if the database provider currently in use is the SQL Server provider. - /// + /// Returns if the database provider currently in use is the SQL Server provider. + /// + /// /// /// This method can only be used after the has been configured because /// it is only then that the provider is known. This means that this method cannot be used /// in because this is where application code sets the /// provider to use as part of configuring the context. /// - /// - /// - /// See Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. + /// + /// See Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. + /// /// /// The facade from . /// if SQL Server is being used; otherwise. diff --git a/src/EFCore.SqlServer/Extensions/SqlServerDbContextOptionsBuilderExtensions.cs b/src/EFCore.SqlServer/Extensions/SqlServerDbContextOptionsBuilderExtensions.cs index 6e2c7f4f1bc..60b1184edf9 100644 --- a/src/EFCore.SqlServer/Extensions/SqlServerDbContextOptionsBuilderExtensions.cs +++ b/src/EFCore.SqlServer/Extensions/SqlServerDbContextOptionsBuilderExtensions.cs @@ -22,20 +22,20 @@ namespace Microsoft.EntityFrameworkCore public static class SqlServerDbContextOptionsExtensions { /// - /// - /// Configures the context to connect to a Microsoft SQL Server database, but without initially setting any - /// or connection string. - /// + /// Configures the context to connect to a Microsoft SQL Server database, but without initially setting any + /// or connection string. + /// + /// /// /// The connection or connection string must be set before the is used to connect /// to a database. Set a connection using . /// Set a connection string using . /// - /// - /// - /// See Using DbContextOptions, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. + /// + /// See Using DbContextOptions, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. + /// /// /// The builder being used to configure the context. /// An optional action to allow additional SQL Server specific configuration. @@ -121,20 +121,20 @@ public static DbContextOptionsBuilder UseSqlServer( } /// - /// - /// Configures the context to connect to a Microsoft SQL Server database, but without initially setting any - /// or connection string. - /// + /// Configures the context to connect to a Microsoft SQL Server database, but without initially setting any + /// or connection string. + /// + /// /// /// The connection or connection string must be set before the is used to connect /// to a database. Set a connection using . /// Set a connection string using . /// - /// - /// - /// See Using DbContextOptions, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. + /// + /// See Using DbContextOptions, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. + /// /// /// The builder being used to configure the context. /// An optional action to allow additional SQL Server specific configuration. diff --git a/src/EFCore.SqlServer/Extensions/SqlServerDbFunctionsExtensions.cs b/src/EFCore.SqlServer/Extensions/SqlServerDbFunctionsExtensions.cs index b580d9208cc..8295386170f 100644 --- a/src/EFCore.SqlServer/Extensions/SqlServerDbFunctionsExtensions.cs +++ b/src/EFCore.SqlServer/Extensions/SqlServerDbFunctionsExtensions.cs @@ -20,9 +20,7 @@ namespace Microsoft.EntityFrameworkCore public static class SqlServerDbFunctionsExtensions { /// - /// - /// A DbFunction method stub that can be used in LINQ queries to target the SQL Server FREETEXT store function. - /// + /// A DbFunction method stub that can be used in LINQ queries to target the SQL Server FREETEXT store function. /// /// /// See Database functions, and @@ -41,9 +39,7 @@ public static bool FreeText( => throw new InvalidOperationException(CoreStrings.FunctionOnClient(nameof(FreeText))); /// - /// - /// A DbFunction method stub that can be used in LINQ queries to target the SQL Server FREETEXT store function. - /// + /// A DbFunction method stub that can be used in LINQ queries to target the SQL Server FREETEXT store function. /// /// /// See Database functions, and @@ -60,9 +56,7 @@ public static bool FreeText( => throw new InvalidOperationException(CoreStrings.FunctionOnClient(nameof(FreeText))); /// - /// - /// A DbFunction method stub that can be used in LINQ queries to target the SQL Server CONTAINS store function. - /// + /// A DbFunction method stub that can be used in LINQ queries to target the SQL Server CONTAINS store function. /// /// /// See Database functions, and @@ -81,9 +75,7 @@ public static bool Contains( => throw new InvalidOperationException(CoreStrings.FunctionOnClient(nameof(Contains))); /// - /// - /// A DbFunction method stub that can be used in LINQ queries to target the SQL Server CONTAINS store function. - /// + /// A DbFunction method stub that can be used in LINQ queries to target the SQL Server CONTAINS store function. /// /// /// See Database functions, and diff --git a/src/EFCore.SqlServer/Extensions/SqlServerDbSetExtensions.cs b/src/EFCore.SqlServer/Extensions/SqlServerDbSetExtensions.cs index 4f29745a704..e44c573ae30 100644 --- a/src/EFCore.SqlServer/Extensions/SqlServerDbSetExtensions.cs +++ b/src/EFCore.SqlServer/Extensions/SqlServerDbSetExtensions.cs @@ -16,10 +16,10 @@ namespace Microsoft.EntityFrameworkCore public static class SqlServerDbSetExtensions { /// - /// - /// Applies temporal 'AsOf' operation on the given DbSet, which only returns elements that were present in the database at a given - /// point in time. - /// + /// Applies temporal 'AsOf' operation on the given DbSet, which only returns elements that were present in the database at a given + /// point in time. + /// + /// /// /// Temporal information is stored in UTC format on the database, so any arguments in local time may lead to /// unexpected results. @@ -27,10 +27,10 @@ public static class SqlServerDbSetExtensions /// /// Temporal queries are always set as 'NoTracking'. /// - /// - /// - /// See Using SQL Server temporal tables with EF Core - /// for more information. + /// + /// See Using SQL Server temporal tables with EF Core + /// for more information. + /// /// /// Source DbSet on which the temporal operation is applied. /// representing a point in time for which the results should be returned. @@ -54,10 +54,10 @@ public static IQueryable TemporalAsOf( } /// - /// - /// Applies temporal 'FromTo' operation on the given DbSet, which only returns elements that were present in the database between two - /// points in time. - /// + /// Applies temporal 'FromTo' operation on the given DbSet, which only returns elements that were present in the database between two + /// points in time. + /// + /// /// /// Elements that were created at the starting point as well as elements that were removed at the end point are not included in the /// results. @@ -73,10 +73,10 @@ public static IQueryable TemporalAsOf( /// /// Temporal queries are always set as 'NoTracking'. /// - /// - /// - /// See Using SQL Server temporal tables with EF Core - /// for more information. + /// + /// See Using SQL Server temporal tables with EF Core + /// for more information. + /// /// /// Source DbSet on which the temporal operation is applied. /// Point in time representing the start of the period for which results should be returned. @@ -103,10 +103,10 @@ public static IQueryable TemporalFromTo( } /// - /// - /// Applies temporal 'Between' operation on the given DbSet, which only returns elements that were present in the database between two - /// points in time. - /// + /// Applies temporal 'Between' operation on the given DbSet, which only returns elements that were present in the database between two + /// points in time. + /// + /// /// /// Elements that were created at the starting point are not included in the results, however elements that were removed at the end /// point are included in the results. @@ -122,10 +122,10 @@ public static IQueryable TemporalFromTo( /// /// Temporal queries are always set as 'NoTracking'. /// - /// - /// - /// See Using SQL Server temporal tables with EF Core - /// for more information. + /// + /// See Using SQL Server temporal tables with EF Core + /// for more information. + /// /// /// Source DbSet on which the temporal operation is applied. /// Point in time representing the start of the period for which results should be returned. @@ -152,10 +152,10 @@ public static IQueryable TemporalBetween( } /// - /// - /// Applies temporal 'ContainedIn' operation on the given DbSet, which only returns elements that were present in the database between - /// two points in time. - /// + /// Applies temporal 'ContainedIn' operation on the given DbSet, which only returns elements that were present in the database between + /// two points in time. + /// + /// /// /// Elements that were created at the starting point as well as elements that were removed at the end point are included in the /// results. @@ -171,10 +171,10 @@ public static IQueryable TemporalBetween( /// /// Temporal queries are always set as 'NoTracking'. /// - /// - /// - /// See Using SQL Server temporal tables with EF Core - /// for more information. + /// + /// See Using SQL Server temporal tables with EF Core + /// for more information. + /// /// /// Source DbSet on which the temporal operation is applied. /// Point in time representing the start of the period for which results should be returned. @@ -201,17 +201,17 @@ public static IQueryable TemporalContainedIn( } /// + /// Applies temporal 'All' operation on the given DbSet, which returns all historical versions of the entities as well as their current + /// state. + /// + /// /// - /// Applies temporal 'All' operation on the given DbSet, which returns all historical versions of the entities as well as their current - /// state. + /// Temporal queries are always set as 'NoTracking'. /// /// - /// Temporal queries are always set as 'NoTracking'. + /// See Using SQL Server temporal tables with EF Core + /// for more information. /// - /// - /// - /// See Using SQL Server temporal tables with EF Core - /// for more information. /// /// Source DbSet on which the temporal operation is applied. /// An representing the entities and their historical versions. diff --git a/src/EFCore.SqlServer/Extensions/SqlServerMigrationBuilderExtensions.cs b/src/EFCore.SqlServer/Extensions/SqlServerMigrationBuilderExtensions.cs index 1702a8da942..9a0a7daa9f0 100644 --- a/src/EFCore.SqlServer/Extensions/SqlServerMigrationBuilderExtensions.cs +++ b/src/EFCore.SqlServer/Extensions/SqlServerMigrationBuilderExtensions.cs @@ -13,9 +13,7 @@ namespace Microsoft.EntityFrameworkCore.Migrations public static class SqlServerMigrationBuilderExtensions { /// - /// - /// Returns if the database provider currently in use is the SQL Server provider. - /// + /// Returns if the database provider currently in use is the SQL Server provider. /// /// /// See Accessing SQL Server and SQL Azure databases with EF Core diff --git a/src/EFCore.SqlServer/Extensions/SqlServerModelBuilderExtensions.cs b/src/EFCore.SqlServer/Extensions/SqlServerModelBuilderExtensions.cs index 70d44991733..c177c7b4a3c 100644 --- a/src/EFCore.SqlServer/Extensions/SqlServerModelBuilderExtensions.cs +++ b/src/EFCore.SqlServer/Extensions/SqlServerModelBuilderExtensions.cs @@ -336,17 +336,17 @@ public static bool CanSetValueGenerationStrategy( } /// + /// Configures the maximum size for Azure SQL Database. + /// + /// /// - /// Configures the maximum size for Azure SQL Database. + /// Units must be included, e.g. "100 MB". See Azure SQL Database documentation for all supported values. /// /// - /// Units must be included, e.g. "100 MB". See Azure SQL Database documentation for all supported values. + /// See Modeling entity types and relationships, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. /// - /// - /// - /// See Modeling entity types and relationships, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. /// /// The model builder. /// The maximum size of the database. @@ -362,17 +362,17 @@ public static ModelBuilder HasDatabaseMaxSize(this ModelBuilder modelBuilder, st } /// + /// Attempts to configure the maximum size for Azure SQL Database. + /// + /// /// - /// Attempts to configure the maximum size for Azure SQL Database. + /// Units must be included, e.g. "100 MB". See Azure SQL Database documentation for all supported values. /// /// - /// Units must be included, e.g. "100 MB". See Azure SQL Database documentation for all supported values. + /// See Modeling entity types and relationships, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. /// - /// - /// - /// See Modeling entity types and relationships, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. /// /// The model builder. /// The maximum size of the database. @@ -418,17 +418,17 @@ public static bool CanSetDatabaseMaxSize( } /// + /// Configures the service tier (EDITION) for Azure SQL Database as a string literal. + /// + /// /// - /// Configures the service tier (EDITION) for Azure SQL Database as a string literal. + /// See Azure SQL Database documentation for supported values. /// /// - /// See Azure SQL Database documentation for supported values. + /// See Modeling entity types and relationships, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. /// - /// - /// - /// See Modeling entity types and relationships, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. /// /// The model builder. /// The service tier of the database as a string literal. @@ -444,17 +444,17 @@ public static ModelBuilder HasServiceTier(this ModelBuilder modelBuilder, string } /// + /// Configures the service tier (EDITION) for Azure SQL Database as a SQL expression. + /// + /// /// - /// Configures the service tier (EDITION) for Azure SQL Database as a SQL expression. + /// See Azure SQL Database documentation for supported values. /// /// - /// See Azure SQL Database documentation for supported values. + /// See Modeling entity types and relationships, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. /// - /// - /// - /// See Modeling entity types and relationships, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. /// /// The model builder. /// The expression for the service tier of the database. @@ -470,17 +470,17 @@ public static ModelBuilder HasServiceTierSql(this ModelBuilder modelBuilder, str } /// + /// Attempts to configure the service tier (EDITION) for Azure SQL Database. + /// + /// /// - /// Attempts to configure the service tier (EDITION) for Azure SQL Database. + /// See Azure SQL Database documentation for supported values. /// /// - /// See Azure SQL Database documentation for supported values. + /// See Modeling entity types and relationships, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. /// - /// - /// - /// See Modeling entity types and relationships, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. /// /// The model builder. /// The expression for the service tier of the database. @@ -526,17 +526,17 @@ public static bool CanSetServiceTierSql( } /// + /// Configures the performance level (SERVICE_OBJECTIVE) for Azure SQL Database as a string literal. + /// + /// /// - /// Configures the performance level (SERVICE_OBJECTIVE) for Azure SQL Database as a string literal. + /// See Azure SQL Database documentation for supported values. /// /// - /// See Azure SQL Database documentation for supported values. + /// See Modeling entity types and relationships, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. /// - /// - /// - /// See Modeling entity types and relationships, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. /// /// The model builder. /// The performance level of the database as a string literal. @@ -552,17 +552,17 @@ public static ModelBuilder HasPerformanceLevel(this ModelBuilder modelBuilder, s } /// + /// Configures the performance level (SERVICE_OBJECTIVE) for Azure SQL Database as a SQL expression. + /// + /// /// - /// Configures the performance level (SERVICE_OBJECTIVE) for Azure SQL Database as a SQL expression. + /// See Azure SQL Database documentation for supported values. /// /// - /// See Azure SQL Database documentation for supported values. + /// See Modeling entity types and relationships, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. /// - /// - /// - /// See Modeling entity types and relationships, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. /// /// The model builder. /// The expression for the performance level of the database. @@ -578,17 +578,17 @@ public static ModelBuilder HasPerformanceLevelSql(this ModelBuilder modelBuilder } /// + /// Attempts to configure the performance level (SERVICE_OBJECTIVE) for Azure SQL Database. + /// + /// /// - /// Attempts to configure the performance level (SERVICE_OBJECTIVE) for Azure SQL Database. + /// See Azure SQL Database documentation for supported values. /// /// - /// See Azure SQL Database documentation for supported values. + /// See Modeling entity types and relationships, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. /// - /// - /// - /// See Modeling entity types and relationships, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. /// /// The model builder. /// The expression for the performance level of the database. diff --git a/src/EFCore.SqlServer/Extensions/SqlServerPropertyExtensions.cs b/src/EFCore.SqlServer/Extensions/SqlServerPropertyExtensions.cs index 09aab5d9aa2..1c53ad0fe42 100644 --- a/src/EFCore.SqlServer/Extensions/SqlServerPropertyExtensions.cs +++ b/src/EFCore.SqlServer/Extensions/SqlServerPropertyExtensions.cs @@ -366,13 +366,11 @@ public static void SetIdentityIncrement(this IMutableProperty property, int? inc => property.FindAnnotation(SqlServerAnnotationNames.IdentityIncrement)?.GetConfigurationSource(); /// - /// - /// Returns the to use for the property. - /// - /// - /// If no strategy is set for the property, then the strategy to use will be taken from the . - /// + /// Returns the to use for the property. /// + /// + /// If no strategy is set for the property, then the strategy to use will be taken from the . + /// /// The property. /// The strategy, or if none was set. public static SqlServerValueGenerationStrategy GetValueGenerationStrategy(this IReadOnlyProperty property) @@ -396,13 +394,11 @@ public static SqlServerValueGenerationStrategy GetValueGenerationStrategy(this I } /// - /// - /// Returns the to use for the property. - /// - /// - /// If no strategy is set for the property, then the strategy to use will be taken from the . - /// + /// Returns the to use for the property. /// + /// + /// If no strategy is set for the property, then the strategy to use will be taken from the . + /// /// The property. /// The identifier of the store object. /// The strategy, or if none was set. diff --git a/src/EFCore.SqlServer/Extensions/SqlServerServiceCollectionExtensions.cs b/src/EFCore.SqlServer/Extensions/SqlServerServiceCollectionExtensions.cs index 1b36617aa96..e3d1d8fbaf0 100644 --- a/src/EFCore.SqlServer/Extensions/SqlServerServiceCollectionExtensions.cs +++ b/src/EFCore.SqlServer/Extensions/SqlServerServiceCollectionExtensions.cs @@ -33,10 +33,10 @@ namespace Microsoft.Extensions.DependencyInjection public static class SqlServerServiceCollectionExtensions { /// - /// - /// Registers the given Entity Framework as a service in the - /// and configures it to connect to a SQL Server database. - /// + /// Registers the given Entity Framework as a service in the + /// and configures it to connect to a SQL Server database. + /// + /// /// /// This method is a shortcut for configuring a to use SQL Server. It does not support all options. /// Use and related methods for full control of @@ -56,11 +56,11 @@ public static class SqlServerServiceCollectionExtensions /// /// See Using DbContext with dependency injection for more information. /// - /// - /// - /// See Using DbContextOptions, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. + /// + /// See Using DbContextOptions, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. + /// /// /// The type of context to be registered. /// The to add services to. @@ -80,10 +80,10 @@ public static IServiceCollection AddSqlServer( return serviceCollection.AddDbContext( (serviceProvider, options) => - { - optionsAction?.Invoke(options); - options.UseSqlServer(connectionString, sqlServerOptionsAction); - }); + { + optionsAction?.Invoke(options); + options.UseSqlServer(connectionString, sqlServerOptionsAction); + }); } /// @@ -95,14 +95,14 @@ public static IServiceCollection AddSqlServer( /// Warning: Do not call this method accidentally. It is much more likely you need /// to call . /// - /// - /// Calling this method is no longer necessary when building most applications, including those that - /// use dependency injection in ASP.NET or elsewhere. - /// It is only needed when building the internal service provider for use with - /// the method. - /// This is not recommend other than for some advanced scenarios. - /// /// + /// + /// Calling this method is no longer necessary when building most applications, including those that + /// use dependency injection in ASP.NET or elsewhere. + /// It is only needed when building the internal service provider for use with + /// the method. + /// This is not recommend other than for some advanced scenarios. + /// /// The to add services to. /// /// The same service collection so that multiple calls can be chained. diff --git a/src/EFCore.SqlServer/Infrastructure/Internal/SqlServerModelValidator.cs b/src/EFCore.SqlServer/Infrastructure/Internal/SqlServerModelValidator.cs index 28234ddc34b..a3b7a9718a0 100644 --- a/src/EFCore.SqlServer/Infrastructure/Internal/SqlServerModelValidator.cs +++ b/src/EFCore.SqlServer/Infrastructure/Internal/SqlServerModelValidator.cs @@ -17,18 +17,16 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqlServerModelValidator : RelationalModelValidator { /// diff --git a/src/EFCore.SqlServer/Infrastructure/SqlServerDbContextOptionsBuilder.cs b/src/EFCore.SqlServer/Infrastructure/SqlServerDbContextOptionsBuilder.cs index 656bc32e9ae..27bf3082c3c 100644 --- a/src/EFCore.SqlServer/Infrastructure/SqlServerDbContextOptionsBuilder.cs +++ b/src/EFCore.SqlServer/Infrastructure/SqlServerDbContextOptionsBuilder.cs @@ -9,14 +9,12 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Allows SQL Server specific configuration to be performed on . - /// - /// - /// Instances of this class are returned from a call to - /// and it is not designed to be directly constructed in your application code. - /// + /// Allows SQL Server specific configuration to be performed on . /// + /// + /// Instances of this class are returned from a call to + /// and it is not designed to be directly constructed in your application code. + /// public class SqlServerDbContextOptionsBuilder : RelationalDbContextOptionsBuilder { @@ -30,9 +28,9 @@ public SqlServerDbContextOptionsBuilder(DbContextOptionsBuilder optionsBuilder) } /// - /// - /// Configures the context to use the default retrying . - /// + /// Configures the context to use the default retrying . + /// + /// /// /// This strategy is specifically tailored to SQL Server (including SQL Azure). It is pre-configured with /// error numbers for transient errors that can be retried. @@ -40,18 +38,18 @@ public SqlServerDbContextOptionsBuilder(DbContextOptionsBuilder optionsBuilder) /// /// Default values of 6 for the maximum retry count and 30 seconds for the maximum default delay are used. /// - /// - /// - /// See Connection resiliency and database retries - /// for more information. + /// + /// See Connection resiliency and database retries + /// for more information. + /// /// public virtual SqlServerDbContextOptionsBuilder EnableRetryOnFailure() => ExecutionStrategy(c => new SqlServerRetryingExecutionStrategy(c)); /// - /// - /// Configures the context to use the default retrying . - /// + /// Configures the context to use the default retrying . + /// + /// /// /// This strategy is specifically tailored to SQL Server (including SQL Azure). It is pre-configured with /// error numbers for transient errors that can be retried. @@ -59,26 +57,26 @@ public virtual SqlServerDbContextOptionsBuilder EnableRetryOnFailure() /// /// A default value 30 seconds for the maximum default delay is used. /// - /// - /// - /// See Connection resiliency and database retries - /// for more information. + /// + /// See Connection resiliency and database retries + /// for more information. + /// /// public virtual SqlServerDbContextOptionsBuilder EnableRetryOnFailure(int maxRetryCount) => ExecutionStrategy(c => new SqlServerRetryingExecutionStrategy(c, maxRetryCount)); /// - /// - /// Configures the context to use the default retrying . - /// + /// Configures the context to use the default retrying . + /// + /// /// /// This strategy is specifically tailored to SQL Server (including SQL Azure). It is pre-configured with /// error numbers for transient errors that can be retried, but additional error numbers can also be supplied. /// - /// - /// - /// See Connection resiliency and database retries - /// for more information. + /// + /// See Connection resiliency and database retries + /// for more information. + /// /// /// The maximum number of retry attempts. /// The maximum delay between retries. diff --git a/src/EFCore.SqlServer/Metadata/Builders/TemporalPeriodPropertyBuilder.cs b/src/EFCore.SqlServer/Metadata/Builders/TemporalPeriodPropertyBuilder.cs index 2a0a71f48a3..ed679faafaf 100644 --- a/src/EFCore.SqlServer/Metadata/Builders/TemporalPeriodPropertyBuilder.cs +++ b/src/EFCore.SqlServer/Metadata/Builders/TemporalPeriodPropertyBuilder.cs @@ -7,10 +7,8 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. /// public class TemporalPeriodPropertyBuilder { diff --git a/src/EFCore.SqlServer/Metadata/Builders/TemporalTableBuilder.cs b/src/EFCore.SqlServer/Metadata/Builders/TemporalTableBuilder.cs index 1bd6df1035d..7e76a765d39 100644 --- a/src/EFCore.SqlServer/Metadata/Builders/TemporalTableBuilder.cs +++ b/src/EFCore.SqlServer/Metadata/Builders/TemporalTableBuilder.cs @@ -7,10 +7,8 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. /// public class TemporalTableBuilder { diff --git a/src/EFCore.SqlServer/Metadata/Builders/TemporalTableBuilder`.cs b/src/EFCore.SqlServer/Metadata/Builders/TemporalTableBuilder`.cs index 4cc376082bc..f1e39a54e0d 100644 --- a/src/EFCore.SqlServer/Metadata/Builders/TemporalTableBuilder`.cs +++ b/src/EFCore.SqlServer/Metadata/Builders/TemporalTableBuilder`.cs @@ -6,10 +6,8 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. /// /// The entity type being configured. public class TemporalTableBuilder : TemporalTableBuilder diff --git a/src/EFCore.SqlServer/Metadata/Conventions/SqlServerConventionSetBuilder.cs b/src/EFCore.SqlServer/Metadata/Conventions/SqlServerConventionSetBuilder.cs index 96ac9408605..5644ad353fa 100644 --- a/src/EFCore.SqlServer/Metadata/Conventions/SqlServerConventionSetBuilder.cs +++ b/src/EFCore.SqlServer/Metadata/Conventions/SqlServerConventionSetBuilder.cs @@ -10,9 +10,9 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions { /// - /// - /// A builder for building conventions for SQL Server. - /// + /// A builder for building conventions for SQL Server. + /// + /// /// /// The service lifetime is and multiple registrations /// are allowed. This means that each instance will use its own @@ -20,11 +20,11 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions /// The implementations may depend on other services registered with any lifetime. /// The implementations do not need to be thread-safe. /// - /// - /// - /// See Model building conventions, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. + /// + /// See Model building conventions, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. + /// /// public class SqlServerConventionSetBuilder : RelationalConventionSetBuilder { @@ -122,15 +122,12 @@ public override ConventionSet CreateConventionSet() } /// - /// - /// Call this method to build a for SQL Server when using - /// the outside of . - /// - /// - /// Note that it is unusual to use this method. - /// Consider using in the normal way instead. - /// + /// Call this method to build a for SQL Server when using + /// the outside of . /// + /// + /// Note that it is unusual to use this method. Consider using in the normal way instead. + /// /// The convention set. public static ConventionSet Build() { @@ -140,14 +137,11 @@ public static ConventionSet Build() } /// - /// - /// Call this method to build a for SQL Server outside of . - /// - /// - /// Note that it is unusual to use this method. - /// Consider using in the normal way instead. - /// + /// Call this method to build a for SQL Server outside of . /// + /// + /// Note that it is unusual to use this method. Consider using in the normal way instead. + /// /// The convention set. public static ModelBuilder CreateModelBuilder() { diff --git a/src/EFCore.SqlServer/Metadata/Internal/SqlServerAnnotationProvider.cs b/src/EFCore.SqlServer/Metadata/Internal/SqlServerAnnotationProvider.cs index 829810e110f..adba1ce03b9 100644 --- a/src/EFCore.SqlServer/Metadata/Internal/SqlServerAnnotationProvider.cs +++ b/src/EFCore.SqlServer/Metadata/Internal/SqlServerAnnotationProvider.cs @@ -12,18 +12,16 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Metadata.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqlServerAnnotationProvider : RelationalAnnotationProvider { /// diff --git a/src/EFCore.SqlServer/Metadata/SqlServerValueGenerationStrategy.cs b/src/EFCore.SqlServer/Metadata/SqlServerValueGenerationStrategy.cs index bd446b33299..03c1ed6d4de 100644 --- a/src/EFCore.SqlServer/Metadata/SqlServerValueGenerationStrategy.cs +++ b/src/EFCore.SqlServer/Metadata/SqlServerValueGenerationStrategy.cs @@ -22,14 +22,12 @@ public enum SqlServerValueGenerationStrategy None, /// - /// - /// A sequence-based hi-lo pattern where blocks of IDs are allocated from the server and - /// used client-side for generating keys. - /// - /// - /// This is an advanced pattern--only use this strategy if you are certain it is what you need. - /// + /// A sequence-based hi-lo pattern where blocks of IDs are allocated from the server and + /// used client-side for generating keys. /// + /// + /// This is an advanced pattern--only use this strategy if you are certain it is what you need. + /// SequenceHiLo, /// diff --git a/src/EFCore.SqlServer/Migrations/Internal/SqlServerHistoryRepository.cs b/src/EFCore.SqlServer/Migrations/Internal/SqlServerHistoryRepository.cs index 8b272599b57..07a9debca25 100644 --- a/src/EFCore.SqlServer/Migrations/Internal/SqlServerHistoryRepository.cs +++ b/src/EFCore.SqlServer/Migrations/Internal/SqlServerHistoryRepository.cs @@ -12,19 +12,17 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Migrations.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class SqlServerHistoryRepository : HistoryRepository { /// diff --git a/src/EFCore.SqlServer/Migrations/Internal/SqlServerMigrationsAnnotationProvider.cs b/src/EFCore.SqlServer/Migrations/Internal/SqlServerMigrationsAnnotationProvider.cs index 3a73f645eb7..4b479cf88ab 100644 --- a/src/EFCore.SqlServer/Migrations/Internal/SqlServerMigrationsAnnotationProvider.cs +++ b/src/EFCore.SqlServer/Migrations/Internal/SqlServerMigrationsAnnotationProvider.cs @@ -12,18 +12,16 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Migrations.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqlServerMigrationsAnnotationProvider : MigrationsAnnotationProvider { /// diff --git a/src/EFCore.SqlServer/Migrations/SqlServerMigrationsSqlGenerator.cs b/src/EFCore.SqlServer/Migrations/SqlServerMigrationsSqlGenerator.cs index 096abfdaf2c..5d55ff5f137 100644 --- a/src/EFCore.SqlServer/Migrations/SqlServerMigrationsSqlGenerator.cs +++ b/src/EFCore.SqlServer/Migrations/SqlServerMigrationsSqlGenerator.cs @@ -24,20 +24,20 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// SQL Server-specific implementation of . - /// + /// SQL Server-specific implementation of . + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Database migrations, and - /// Accessing SQL Server and SQL Azure databases with EF Core - /// for more information. + /// + /// See Database migrations, and + /// Accessing SQL Server and SQL Azure databases with EF Core + /// for more information. + /// /// public class SqlServerMigrationsSqlGenerator : MigrationsSqlGenerator { @@ -80,17 +80,15 @@ public override IReadOnlyList Generate( } /// - /// - /// Builds commands for the given by making calls on the given - /// . - /// - /// - /// This method uses a double-dispatch mechanism to call the method - /// that is specific to a certain subtype of . Typically database providers - /// will override these specific methods rather than this method. However, providers can override - /// this methods to handle provider-specific operations. - /// + /// Builds commands for the given by making calls on the given + /// . /// + /// + /// This method uses a double-dispatch mechanism to call the method + /// that is specific to a certain subtype of . Typically database providers + /// will override these specific methods rather than this method. However, providers can override + /// this methods to handle provider-specific operations. + /// /// The operation. /// The target model which may be if the operations exist without a model. /// The command builder to use to build the commands. @@ -738,8 +736,7 @@ protected override void Generate( { var dropHistoryTableOperation = new DropTableOperation { - Name = historyTableName, - Schema = historyTableSchema, + Name = historyTableName, Schema = historyTableSchema, }; Generate(dropHistoryTableOperation, model, builder, terminate); @@ -2026,9 +2023,7 @@ protected virtual void CreateIndexes( } /// - /// - /// Generates add commands for descriptions on tables and columns. - /// + /// Generates add commands for descriptions on tables and columns. /// /// The command builder to use to build the commands. /// The new description to be applied. @@ -2210,9 +2205,7 @@ void AddConcatOperatorIfNeeded() } /// - /// - /// Generates drop commands for descriptions on tables and columns. - /// + /// Generates drop commands for descriptions on tables and columns. /// /// The command builder to use to build the commands. /// The schema of the table. @@ -2574,11 +2567,7 @@ alterTableOperation.OldTable[SqlServerAnnotationNames.TemporalHistoryTableSchema if (historyTableName != null) { operations.Add( - new DropTableOperation - { - Name = historyTableName, - Schema = alterTableOperation.OldTable.Schema - }); + new DropTableOperation { Name = historyTableName, Schema = alterTableOperation.OldTable.Schema }); } operations.Add(operation); @@ -2672,10 +2661,7 @@ void EnableVersioning(string table, string? schema, string historyTableName, str } operations.Add( - new SqlOperation - { - Sql = stringBuilder.ToString() - }); + new SqlOperation { Sql = stringBuilder.ToString() }); } void DisablePeriod(string table, string? schema, string periodStartColumnName, string periodEndColumnName) @@ -2711,17 +2697,14 @@ void EnablePeriod(string table, string? schema, string periodStartColumnName, st if (options.HasFlag(MigrationsSqlGenerationOptions.Idempotent)) { addPeriodSql = new StringBuilder() - .Append("EXEC(N'") - .Append(addPeriodSql.Replace("'", "''")) - .Append("')") - .ToString(); + .Append("EXEC(N'") + .Append(addPeriodSql.Replace("'", "''")) + .Append("')") + .ToString(); } operations.Add( - new SqlOperation - { - Sql = addPeriodSql - }); + new SqlOperation { Sql = addPeriodSql }); operations.Add( new SqlOperation diff --git a/src/EFCore.SqlServer/Query/Internal/SqlServerQueryCompilationContextFactory.cs b/src/EFCore.SqlServer/Query/Internal/SqlServerQueryCompilationContextFactory.cs index c2b2465981d..80d2e65d909 100644 --- a/src/EFCore.SqlServer/Query/Internal/SqlServerQueryCompilationContextFactory.cs +++ b/src/EFCore.SqlServer/Query/Internal/SqlServerQueryCompilationContextFactory.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class SqlServerQueryCompilationContextFactory : IQueryCompilationContextFactory { private readonly ISqlServerConnection _sqlServerConnection; diff --git a/src/EFCore.SqlServer/SqlServerRetryingExecutionStrategy.cs b/src/EFCore.SqlServer/SqlServerRetryingExecutionStrategy.cs index 6d9c00dc3a1..2e8dc32325c 100644 --- a/src/EFCore.SqlServer/SqlServerRetryingExecutionStrategy.cs +++ b/src/EFCore.SqlServer/SqlServerRetryingExecutionStrategy.cs @@ -11,26 +11,22 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// An implementation for retrying failed executions on SQL Server. - /// - /// - /// This strategy is specifically tailored to SQL Server (including SQL Azure). It is pre-configured with - /// error numbers for transient errors that can be retried. Additional error numbers to retry on can also be supplied. - /// + /// An implementation for retrying failed executions on SQL Server. /// + /// + /// This strategy is specifically tailored to SQL Server (including SQL Azure). It is pre-configured with + /// error numbers for transient errors that can be retried. Additional error numbers to retry on can also be supplied. + /// public class SqlServerRetryingExecutionStrategy : ExecutionStrategy { private readonly ICollection? _additionalErrorNumbers; /// - /// - /// Creates a new instance of . - /// - /// - /// Default values of 6 for the maximum retry count and 30 seconds for the maximum default delay are used. - /// + /// Creates a new instance of . /// + /// + /// Default values of 6 for the maximum retry count and 30 seconds for the maximum default delay are used. + /// /// The context on which the operations will be invoked. public SqlServerRetryingExecutionStrategy( DbContext context) @@ -39,13 +35,11 @@ public SqlServerRetryingExecutionStrategy( } /// - /// - /// Creates a new instance of . - /// - /// - /// Default values of 6 for the maximum retry count and 30 seconds for the maximum default delay are used. - /// + /// Creates a new instance of . /// + /// + /// Default values of 6 for the maximum retry count and 30 seconds for the maximum default delay are used. + /// /// Parameter object containing service dependencies. public SqlServerRetryingExecutionStrategy( ExecutionStrategyDependencies dependencies) @@ -54,13 +48,11 @@ public SqlServerRetryingExecutionStrategy( } /// - /// - /// Creates a new instance of . - /// - /// - /// A default value 30 seconds for the maximum default delay is used. - /// + /// Creates a new instance of . /// + /// + /// A default value 30 seconds for the maximum default delay is used. + /// /// The context on which the operations will be invoked. /// The maximum number of retry attempts. public SqlServerRetryingExecutionStrategy( @@ -71,13 +63,11 @@ public SqlServerRetryingExecutionStrategy( } /// - /// - /// Creates a new instance of . - /// - /// - /// A default value 30 seconds for the maximum default delay is used. - /// + /// Creates a new instance of . /// + /// + /// A default value 30 seconds for the maximum default delay is used. + /// /// Parameter object containing service dependencies. /// The maximum number of retry attempts. public SqlServerRetryingExecutionStrategy( diff --git a/src/EFCore.SqlServer/Storage/Internal/ISqlServerConnection.cs b/src/EFCore.SqlServer/Storage/Internal/ISqlServerConnection.cs index 1955a74a587..53991f17fcd 100644 --- a/src/EFCore.SqlServer/Storage/Internal/ISqlServerConnection.cs +++ b/src/EFCore.SqlServer/Storage/Internal/ISqlServerConnection.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface ISqlServerConnection : IRelationalConnection { /// diff --git a/src/EFCore.SqlServer/Storage/Internal/SqlServerConnection.cs b/src/EFCore.SqlServer/Storage/Internal/SqlServerConnection.cs index fc443cbf8a4..ca4c8cd0185 100644 --- a/src/EFCore.SqlServer/Storage/Internal/SqlServerConnection.cs +++ b/src/EFCore.SqlServer/Storage/Internal/SqlServerConnection.cs @@ -10,19 +10,17 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class SqlServerConnection : RelationalConnection, ISqlServerConnection { // Compensate for slow SQL Server database creation diff --git a/src/EFCore.SqlServer/Storage/Internal/SqlServerDatabaseCreator.cs b/src/EFCore.SqlServer/Storage/Internal/SqlServerDatabaseCreator.cs index 195c681e42b..2ea7186ee05 100644 --- a/src/EFCore.SqlServer/Storage/Internal/SqlServerDatabaseCreator.cs +++ b/src/EFCore.SqlServer/Storage/Internal/SqlServerDatabaseCreator.cs @@ -19,19 +19,17 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class SqlServerDatabaseCreator : RelationalDatabaseCreator { private readonly ISqlServerConnection _connection; @@ -198,53 +196,53 @@ public override bool Exists() private bool Exists(bool retryOnNotExists) => Dependencies.ExecutionStrategy.Execute( DateTime.UtcNow + RetryTimeout, giveUp => + { + while (true) { - while (true) + var opened = false; + try + { + using var _ = new TransactionScope(TransactionScopeOption.Suppress); + _connection.Open(errorsExpected: true); + opened = true; + + _rawSqlCommandBuilder + .Build("SELECT 1") + .ExecuteNonQuery( + new RelationalCommandParameterObject( + _connection, + null, + null, + Dependencies.CurrentContext.Context, + Dependencies.CommandLogger, CommandSource.Migrations)); + + return true; + } + catch (SqlException e) { - var opened = false; - try + if (!retryOnNotExists + && IsDoesNotExist(e)) { - using var _ = new TransactionScope(TransactionScopeOption.Suppress); - _connection.Open(errorsExpected: true); - opened = true; - - _rawSqlCommandBuilder - .Build("SELECT 1") - .ExecuteNonQuery( - new RelationalCommandParameterObject( - _connection, - null, - null, - Dependencies.CurrentContext.Context, - Dependencies.CommandLogger, CommandSource.Migrations)); - - return true; + return false; } - catch (SqlException e) + + if (DateTime.UtcNow > giveUp + || !RetryOnExistsFailure(e)) { - if (!retryOnNotExists - && IsDoesNotExist(e)) - { - return false; - } - - if (DateTime.UtcNow > giveUp - || !RetryOnExistsFailure(e)) - { - throw; - } - - Thread.Sleep(RetryDelay); + throw; } - finally + + Thread.Sleep(RetryDelay); + } + finally + { + if (opened) { - if (opened) - { - _connection.Close(); - } + _connection.Close(); } } - }, + } + }, null); /// @@ -259,57 +257,57 @@ public override Task ExistsAsync(CancellationToken cancellationToken = def private Task ExistsAsync(bool retryOnNotExists, CancellationToken cancellationToken) => Dependencies.ExecutionStrategy.ExecuteAsync( DateTime.UtcNow + RetryTimeout, async (giveUp, ct) => + { + while (true) { - while (true) - { - var opened = false; + var opened = false; - try + try + { + using var _ = new TransactionScope( + TransactionScopeOption.Suppress, TransactionScopeAsyncFlowOption.Enabled); + await _connection.OpenAsync(ct, errorsExpected: true).ConfigureAwait(false); + opened = true; + + await _rawSqlCommandBuilder + .Build("SELECT 1") + .ExecuteNonQueryAsync( + new RelationalCommandParameterObject( + _connection, + null, + null, + Dependencies.CurrentContext.Context, + Dependencies.CommandLogger, CommandSource.Migrations), + ct) + .ConfigureAwait(false); + + return true; + } + catch (SqlException e) + { + if (!retryOnNotExists + && IsDoesNotExist(e)) { - using var _ = new TransactionScope( - TransactionScopeOption.Suppress, TransactionScopeAsyncFlowOption.Enabled); - await _connection.OpenAsync(ct, errorsExpected: true).ConfigureAwait(false); - opened = true; - - await _rawSqlCommandBuilder - .Build("SELECT 1") - .ExecuteNonQueryAsync( - new RelationalCommandParameterObject( - _connection, - null, - null, - Dependencies.CurrentContext.Context, - Dependencies.CommandLogger, CommandSource.Migrations), - ct) - .ConfigureAwait(false); - - return true; + return false; } - catch (SqlException e) + + if (DateTime.UtcNow > giveUp + || !RetryOnExistsFailure(e)) { - if (!retryOnNotExists - && IsDoesNotExist(e)) - { - return false; - } - - if (DateTime.UtcNow > giveUp - || !RetryOnExistsFailure(e)) - { - throw; - } - - await Task.Delay(RetryDelay, ct).ConfigureAwait(false); + throw; } - finally + + await Task.Delay(RetryDelay, ct).ConfigureAwait(false); + } + finally + { + if (opened) { - if (opened) - { - await _connection.CloseAsync().ConfigureAwait(false); - } + await _connection.CloseAsync().ConfigureAwait(false); } } - }, null, cancellationToken); + } + }, null, cancellationToken); // Login failed is thrown when database does not exist (See Issue #776) // Unable to attach database file is thrown when file does not exist (See Issue #2810) diff --git a/src/EFCore.SqlServer/Storage/Internal/SqlServerExecutionStrategyFactory.cs b/src/EFCore.SqlServer/Storage/Internal/SqlServerExecutionStrategyFactory.cs index a54fc59d9ad..f44f19ca072 100644 --- a/src/EFCore.SqlServer/Storage/Internal/SqlServerExecutionStrategyFactory.cs +++ b/src/EFCore.SqlServer/Storage/Internal/SqlServerExecutionStrategyFactory.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class SqlServerExecutionStrategyFactory : RelationalExecutionStrategyFactory { /// diff --git a/src/EFCore.SqlServer/Storage/Internal/SqlServerSqlGenerationHelper.cs b/src/EFCore.SqlServer/Storage/Internal/SqlServerSqlGenerationHelper.cs index c4bd01eab01..b357303e023 100644 --- a/src/EFCore.SqlServer/Storage/Internal/SqlServerSqlGenerationHelper.cs +++ b/src/EFCore.SqlServer/Storage/Internal/SqlServerSqlGenerationHelper.cs @@ -11,18 +11,16 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqlServerSqlGenerationHelper : RelationalSqlGenerationHelper { /// diff --git a/src/EFCore.SqlServer/Storage/Internal/SqlServerTypeMappingSource.cs b/src/EFCore.SqlServer/Storage/Internal/SqlServerTypeMappingSource.cs index 8944d76a32c..04b077b5f22 100644 --- a/src/EFCore.SqlServer/Storage/Internal/SqlServerTypeMappingSource.cs +++ b/src/EFCore.SqlServer/Storage/Internal/SqlServerTypeMappingSource.cs @@ -13,18 +13,16 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqlServerTypeMappingSource : RelationalTypeMappingSource { private readonly RelationalTypeMapping _sqlVariant diff --git a/src/EFCore.SqlServer/Update/Internal/ISqlServerUpdateSqlGenerator.cs b/src/EFCore.SqlServer/Update/Internal/ISqlServerUpdateSqlGenerator.cs index 8dc446ff106..197c7b7f03f 100644 --- a/src/EFCore.SqlServer/Update/Internal/ISqlServerUpdateSqlGenerator.cs +++ b/src/EFCore.SqlServer/Update/Internal/ISqlServerUpdateSqlGenerator.cs @@ -9,18 +9,16 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Update.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface ISqlServerUpdateSqlGenerator : IUpdateSqlGenerator { /// diff --git a/src/EFCore.SqlServer/Update/Internal/SqlServerModificationCommandBatchFactory.cs b/src/EFCore.SqlServer/Update/Internal/SqlServerModificationCommandBatchFactory.cs index 85e1027e2e7..e80180850a3 100644 --- a/src/EFCore.SqlServer/Update/Internal/SqlServerModificationCommandBatchFactory.cs +++ b/src/EFCore.SqlServer/Update/Internal/SqlServerModificationCommandBatchFactory.cs @@ -11,19 +11,17 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Update.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class SqlServerModificationCommandBatchFactory : IModificationCommandBatchFactory { private readonly IDbContextOptions _options; diff --git a/src/EFCore.SqlServer/Update/Internal/SqlServerUpdateSqlGenerator.cs b/src/EFCore.SqlServer/Update/Internal/SqlServerUpdateSqlGenerator.cs index 2261098cd1b..dd84544bb9a 100644 --- a/src/EFCore.SqlServer/Update/Internal/SqlServerUpdateSqlGenerator.cs +++ b/src/EFCore.SqlServer/Update/Internal/SqlServerUpdateSqlGenerator.cs @@ -14,18 +14,16 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.Update.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqlServerUpdateSqlGenerator : UpdateSqlGenerator, ISqlServerUpdateSqlGenerator { /// @@ -297,11 +295,11 @@ private void AppendMergeCommandHeader( writeOperations, (toInsertTableAlias, SqlGenerationHelper), static (sb, o, state) => - { - var (alias, helper) = state; - sb.Append(alias).Append('.'); - helper.DelimitIdentifier(sb, o.ColumnName); - }) + { + var (alias, helper) = state; + sb.Append(alias).Append('.'); + helper.DelimitIdentifier(sb, o.ColumnName); + }) .Append(')'); } @@ -318,16 +316,16 @@ private void AppendValues( operations, SqlGenerationHelper, (sb, o, helper) => + { + if (o.IsWrite) + { + helper.GenerateParameterName(sb, o.ParameterName!); + } + else { - if (o.IsWrite) - { - helper.GenerateParameterName(sb, o.ParameterName!); - } - else - { - sb.Append("DEFAULT"); - } - }) + sb.Append("DEFAULT"); + } + }) .Append(", ") .Append(additionalLiteral) .Append(')'); @@ -350,10 +348,10 @@ private void AppendDeclareTable( operations, this, (sb, o, generator) => - { - generator.SqlGenerationHelper.DelimitIdentifier(sb, o.ColumnName); - sb.Append(' ').Append(generator.GetTypeNameForCopy(o.Property!)); - }); + { + generator.SqlGenerationHelper.DelimitIdentifier(sb, o.ColumnName); + sb.Append(' ').Append(generator.GetTypeNameForCopy(o.Property!)); + }); if (additionalColumns != null) { @@ -393,10 +391,10 @@ private void AppendOutputClause( operations, SqlGenerationHelper, (sb, o, helper) => - { - sb.Append("INSERTED."); - helper.DelimitIdentifier(sb, o.ColumnName); - }); + { + sb.Append("INSERTED."); + helper.DelimitIdentifier(sb, o.ColumnName); + }); if (additionalColumns != null) { @@ -474,13 +472,13 @@ private ResultSetMapping AppendSelectCommand( .Append(" ON ") .AppendJoin( keyOperations, (sb, c) => - { - sb.Append('('); - SqlGenerationHelper.DelimitIdentifier(sb, c.ColumnName, "t"); - sb.Append(" = "); - SqlGenerationHelper.DelimitIdentifier(sb, c.ColumnName, "i"); - sb.Append(')'); - }, " AND "); + { + sb.Append('('); + SqlGenerationHelper.DelimitIdentifier(sb, c.ColumnName, "t"); + sb.Append(" = "); + SqlGenerationHelper.DelimitIdentifier(sb, c.ColumnName, "i"); + sb.Append(')'); + }, " AND "); } if (orderColumn != null) diff --git a/src/EFCore.SqlServer/ValueGeneration/Internal/ISqlServerValueGeneratorCache.cs b/src/EFCore.SqlServer/ValueGeneration/Internal/ISqlServerValueGeneratorCache.cs index 006db6edfd2..7277b1fa837 100644 --- a/src/EFCore.SqlServer/ValueGeneration/Internal/ISqlServerValueGeneratorCache.cs +++ b/src/EFCore.SqlServer/ValueGeneration/Internal/ISqlServerValueGeneratorCache.cs @@ -9,18 +9,16 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.ValueGeneration.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface ISqlServerValueGeneratorCache : IValueGeneratorCache { /// diff --git a/src/EFCore.SqlServer/ValueGeneration/Internal/SqlServerValueGeneratorCache.cs b/src/EFCore.SqlServer/ValueGeneration/Internal/SqlServerValueGeneratorCache.cs index a5c63f52ed1..c14e7124332 100644 --- a/src/EFCore.SqlServer/ValueGeneration/Internal/SqlServerValueGeneratorCache.cs +++ b/src/EFCore.SqlServer/ValueGeneration/Internal/SqlServerValueGeneratorCache.cs @@ -11,18 +11,16 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.ValueGeneration.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqlServerValueGeneratorCache : ValueGeneratorCache, ISqlServerValueGeneratorCache { private readonly ConcurrentDictionary _sequenceGeneratorCache = new(); diff --git a/src/EFCore.SqlServer/ValueGeneration/Internal/SqlServerValueGeneratorSelector.cs b/src/EFCore.SqlServer/ValueGeneration/Internal/SqlServerValueGeneratorSelector.cs index 1e3fce71b4f..27628cea42f 100644 --- a/src/EFCore.SqlServer/ValueGeneration/Internal/SqlServerValueGeneratorSelector.cs +++ b/src/EFCore.SqlServer/ValueGeneration/Internal/SqlServerValueGeneratorSelector.cs @@ -13,19 +13,17 @@ namespace Microsoft.EntityFrameworkCore.SqlServer.ValueGeneration.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class SqlServerValueGeneratorSelector : RelationalValueGeneratorSelector { private readonly ISqlServerSequenceValueGeneratorFactory _sequenceFactory; diff --git a/src/EFCore.Sqlite.Core/Diagnostics/SqliteEventId.cs b/src/EFCore.Sqlite.Core/Diagnostics/SqliteEventId.cs index ef61a3fba50..e42fd2d9610 100644 --- a/src/EFCore.Sqlite.Core/Diagnostics/SqliteEventId.cs +++ b/src/EFCore.Sqlite.Core/Diagnostics/SqliteEventId.cs @@ -8,18 +8,18 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Event IDs for SQLite events that correspond to messages logged to an - /// and events sent to a . - /// + /// Event IDs for SQLite events that correspond to messages logged to an + /// and events sent to a . + /// + /// /// /// These IDs are also used with to configure the /// behavior of warnings. /// - /// - /// - /// See Logging, events, and diagnostics, and - /// Accessing SQLite databases with EF Core for more information. + /// + /// See Logging, events, and diagnostics, and + /// Accessing SQLite databases with EF Core for more information. + /// /// public static class SqliteEventId { @@ -57,29 +57,29 @@ private static EventId MakeValidationId(Id id) => new((int)id, _validationPrefix + id); /// - /// - /// A schema was configured for an entity type, but SQLite does not support schemas. - /// + /// A schema was configured for an entity type, but SQLite does not support schemas. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId SchemaConfiguredWarning = MakeValidationId(Id.SchemaConfiguredWarning); /// - /// - /// A sequence was configured for an entity type, but SQLite does not support sequences. - /// + /// A sequence was configured for an entity type, but SQLite does not support sequences. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId SequenceConfiguredWarning = MakeValidationId(Id.SequenceConfiguredWarning); private static readonly string _infraPrefix = DbLoggerCategory.Infrastructure.Name + "."; @@ -88,9 +88,9 @@ private static EventId MakeInfraId(Id id) => new((int)id, _infraPrefix + id); /// - /// - /// A connection of an unexpected type is being used. - /// + /// A connection of an unexpected type is being used. + /// + /// /// /// This event is in the category. /// @@ -98,7 +98,7 @@ private static EventId MakeInfraId(Id id) /// This event uses the /// payload when used with a . /// - /// + /// public static readonly EventId UnexpectedConnectionTypeWarning = MakeInfraId(Id.UnexpectedConnectionTypeWarning); private static readonly string _migrationsPrefix = DbLoggerCategory.Migrations.Name + "."; @@ -108,8 +108,10 @@ private static EventId MakeMigrationsId(Id id) /// /// An operation may fail due to a pending rebuild of the table. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId TableRebuildPendingWarning = MakeMigrationsId(Id.TableRebuildPendingWarning); private static readonly string _scaffoldingPrefix = DbLoggerCategory.Scaffolding.Name + "."; @@ -119,64 +121,84 @@ private static EventId MakeScaffoldingId(Id id) /// /// A column was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId ColumnFound = MakeScaffoldingId(Id.ColumnFound); /// /// SQLite does not support schemas. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId SchemasNotSupportedWarning = MakeScaffoldingId(Id.SchemasNotSupportedWarning); /// /// A foreign key references a missing table. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId ForeignKeyReferencesMissingTableWarning = MakeScaffoldingId(Id.ForeignKeyReferencesMissingTableWarning); /// /// A table was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId TableFound = MakeScaffoldingId(Id.TableFound); /// /// The database is missing a table. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId MissingTableWarning = MakeScaffoldingId(Id.MissingTableWarning); /// /// A column referenced by a foreign key constraint was not found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId ForeignKeyPrincipalColumnMissingWarning = MakeScaffoldingId(Id.ForeignKeyPrincipalColumnMissingWarning); /// /// An index was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId IndexFound = MakeScaffoldingId(Id.IndexFound); /// /// A foreign key was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId ForeignKeyFound = MakeScaffoldingId(Id.ForeignKeyFound); /// /// A primary key was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId PrimaryKeyFound = MakeScaffoldingId(Id.PrimaryKeyFound); /// /// A unique constraint was found. - /// This event is in the category. /// + /// + /// This event is in the category. + /// public static readonly EventId UniqueConstraintFound = MakeScaffoldingId(Id.UniqueConstraintFound); } } diff --git a/src/EFCore.Sqlite.Core/Extensions/SqliteDatabaseFacadeExtensions.cs b/src/EFCore.Sqlite.Core/Extensions/SqliteDatabaseFacadeExtensions.cs index c05053d810e..7034c3e0612 100644 --- a/src/EFCore.Sqlite.Core/Extensions/SqliteDatabaseFacadeExtensions.cs +++ b/src/EFCore.Sqlite.Core/Extensions/SqliteDatabaseFacadeExtensions.cs @@ -13,18 +13,18 @@ namespace Microsoft.EntityFrameworkCore public static class SqliteDatabaseFacadeExtensions { /// - /// - /// Returns if the database provider currently in use is the SQLite provider. - /// + /// Returns if the database provider currently in use is the SQLite provider. + /// + /// /// /// This method can only be used after the has been configured because /// it is only then that the provider is known. This means that this method cannot be used /// in because this is where application code sets the /// provider to use as part of configuring the context. /// - /// - /// - /// See Accessing SQLite databases with EF Core for more information. + /// + /// See Accessing SQLite databases with EF Core for more information. + /// /// /// The facade from . /// if SQLite is being used; otherwise. diff --git a/src/EFCore.Sqlite.Core/Extensions/SqliteDbContextOptionsBuilderExtensions.cs b/src/EFCore.Sqlite.Core/Extensions/SqliteDbContextOptionsBuilderExtensions.cs index 29df9a9de08..513d710d1c2 100644 --- a/src/EFCore.Sqlite.Core/Extensions/SqliteDbContextOptionsBuilderExtensions.cs +++ b/src/EFCore.Sqlite.Core/Extensions/SqliteDbContextOptionsBuilderExtensions.cs @@ -20,19 +20,19 @@ namespace Microsoft.EntityFrameworkCore public static class SqliteDbContextOptionsBuilderExtensions { /// - /// - /// Configures the context to connect to a SQLite database, but without initially setting any - /// or connection string. - /// + /// Configures the context to connect to a SQLite database, but without initially setting any + /// or connection string. + /// + /// /// /// The connection or connection string must be set before the is used to connect /// to a database. Set a connection using . /// Set a connection string using . /// - /// - /// - /// See Using DbContextOptions, and - /// Accessing SQLite databases with EF Core for more information. + /// + /// See Using DbContextOptions, and + /// Accessing SQLite databases with EF Core for more information. + /// /// /// The builder being used to configure the context. /// An optional action to allow additional SQLite specific configuration. @@ -115,19 +115,19 @@ public static DbContextOptionsBuilder UseSqlite( } /// - /// - /// Configures the context to connect to a SQLite database, but without initially setting any - /// or connection string. - /// + /// Configures the context to connect to a SQLite database, but without initially setting any + /// or connection string. + /// + /// /// /// The connection or connection string must be set before the is used to connect /// to a database. Set a connection using . /// Set a connection string using . /// - /// - /// - /// See Using DbContextOptions, and - /// Accessing SQLite databases with EF Core for more information. + /// + /// See Using DbContextOptions, and + /// Accessing SQLite databases with EF Core for more information. + /// /// /// The builder being used to configure the context. /// An optional action to allow additional SQLite specific configuration. diff --git a/src/EFCore.Sqlite.Core/Extensions/SqliteMigrationBuilderExtensions.cs b/src/EFCore.Sqlite.Core/Extensions/SqliteMigrationBuilderExtensions.cs index f34c20ee98c..d960efe820c 100644 --- a/src/EFCore.Sqlite.Core/Extensions/SqliteMigrationBuilderExtensions.cs +++ b/src/EFCore.Sqlite.Core/Extensions/SqliteMigrationBuilderExtensions.cs @@ -16,9 +16,7 @@ namespace Microsoft.EntityFrameworkCore.Migrations public static class SqliteMigrationBuilderExtensions { /// - /// - /// Returns if the database provider currently in use is the SQLite provider. - /// + /// Returns if the database provider currently in use is the SQLite provider. /// /// /// See Accessing SQLite databases with EF Core for more information. diff --git a/src/EFCore.Sqlite.Core/Extensions/SqliteServiceCollectionExtensions.cs b/src/EFCore.Sqlite.Core/Extensions/SqliteServiceCollectionExtensions.cs index 6818bfbdb79..7d3b5b4d26c 100644 --- a/src/EFCore.Sqlite.Core/Extensions/SqliteServiceCollectionExtensions.cs +++ b/src/EFCore.Sqlite.Core/Extensions/SqliteServiceCollectionExtensions.cs @@ -31,10 +31,10 @@ namespace Microsoft.Extensions.DependencyInjection public static class SqliteServiceCollectionExtensions { /// - /// - /// Registers the given Entity Framework as a service in the - /// and configures it to connect to a SQLite database. - /// + /// Registers the given Entity Framework as a service in the + /// and configures it to connect to a SQLite database. + /// + /// /// /// This method is a shortcut for configuring a to use SQLite. It does not support all options. /// Use and related methods for full control of @@ -54,10 +54,10 @@ public static class SqliteServiceCollectionExtensions /// /// See Using DbContext with dependency injection for more information. /// - /// - /// - /// See Using DbContextOptions, and - /// Accessing SQLite databases with EF Core for more information. + /// + /// See Using DbContextOptions, and + /// Accessing SQLite databases with EF Core for more information. + /// /// /// The type of context to be registered. /// The to add services to. @@ -77,10 +77,10 @@ public static IServiceCollection AddSqlite( return serviceCollection.AddDbContext( (serviceProvider, options) => - { - optionsAction?.Invoke(options); - options.UseSqlite(connectionString, sqliteOptionsAction); - }); + { + optionsAction?.Invoke(options); + options.UseSqlite(connectionString, sqliteOptionsAction); + }); } /// @@ -92,14 +92,14 @@ public static IServiceCollection AddSqlite( /// Warning: Do not call this method accidentally. It is much more likely you need /// to call . /// - /// - /// Calling this method is no longer necessary when building most applications, including those that - /// use dependency injection in ASP.NET or elsewhere. - /// It is only needed when building the internal service provider for use with - /// the method. - /// This is not recommend other than for some advanced scenarios. - /// /// + /// + /// Calling this method is no longer necessary when building most applications, including those that + /// use dependency injection in ASP.NET or elsewhere. + /// It is only needed when building the internal service provider for use with + /// the method. + /// This is not recommend other than for some advanced scenarios. + /// /// The to add services to. /// /// The same service collection so that multiple calls can be chained. diff --git a/src/EFCore.Sqlite.Core/Infrastructure/Internal/SqliteModelValidator.cs b/src/EFCore.Sqlite.Core/Infrastructure/Internal/SqliteModelValidator.cs index 53370cdc5c6..483f57cdef1 100644 --- a/src/EFCore.Sqlite.Core/Infrastructure/Internal/SqliteModelValidator.cs +++ b/src/EFCore.Sqlite.Core/Infrastructure/Internal/SqliteModelValidator.cs @@ -12,18 +12,16 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Infrastructure.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqliteModelValidator : RelationalModelValidator { /// diff --git a/src/EFCore.Sqlite.Core/Infrastructure/SpatialiteLoader.cs b/src/EFCore.Sqlite.Core/Infrastructure/SpatialiteLoader.cs index 37a0de007ca..9e243a37a26 100644 --- a/src/EFCore.Sqlite.Core/Infrastructure/SpatialiteLoader.cs +++ b/src/EFCore.Sqlite.Core/Infrastructure/SpatialiteLoader.cs @@ -82,13 +82,11 @@ public static bool TryLoad(DbConnection connection) } /// - /// - /// Loads the mod_spatialite extension into the specified connection. - /// - /// - /// The extension will be loaded from native NuGet assets when available. - /// + /// Loads the mod_spatialite extension into the specified connection. /// + /// + /// The extension will be loaded from native NuGet assets when available. + /// /// The connection. public static void Load(DbConnection connection) { diff --git a/src/EFCore.Sqlite.Core/Infrastructure/SqliteDbContextOptionsBuilder.cs b/src/EFCore.Sqlite.Core/Infrastructure/SqliteDbContextOptionsBuilder.cs index 64c6e4e0b7f..276f1801f5a 100644 --- a/src/EFCore.Sqlite.Core/Infrastructure/SqliteDbContextOptionsBuilder.cs +++ b/src/EFCore.Sqlite.Core/Infrastructure/SqliteDbContextOptionsBuilder.cs @@ -6,19 +6,19 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Allows SQLite specific configuration to be performed on . - /// + /// Allows SQLite specific configuration to be performed on . + /// + /// /// /// Instances of this class are returned from a call to /// /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Using DbContextOptions, and - /// Accessing SQLite databases with EF Core for more information. + /// + /// See Using DbContextOptions, and + /// Accessing SQLite databases with EF Core for more information. + /// /// public class SqliteDbContextOptionsBuilder : RelationalDbContextOptionsBuilder { diff --git a/src/EFCore.Sqlite.Core/Metadata/Conventions/SqliteConventionSetBuilder.cs b/src/EFCore.Sqlite.Core/Metadata/Conventions/SqliteConventionSetBuilder.cs index 475aea9633c..c9123620654 100644 --- a/src/EFCore.Sqlite.Core/Metadata/Conventions/SqliteConventionSetBuilder.cs +++ b/src/EFCore.Sqlite.Core/Metadata/Conventions/SqliteConventionSetBuilder.cs @@ -9,9 +9,9 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions { /// - /// - /// A builder for building conventions for SQLite. - /// + /// A builder for building conventions for SQLite. + /// + /// /// /// The service lifetime is and multiple registrations /// are allowed. This means that each instance will use its own @@ -19,10 +19,10 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions /// The implementations may depend on other services registered with any lifetime. /// The implementations do not need to be thread-safe. /// - /// - /// - /// See Model building conventions, and - /// Accessing SQLite databases with EF Core for more information. + /// + /// See Model building conventions, and + /// Accessing SQLite databases with EF Core for more information. + /// /// public class SqliteConventionSetBuilder : RelationalConventionSetBuilder { @@ -58,15 +58,13 @@ public override ConventionSet CreateConventionSet() } /// - /// - /// Call this method to build a for SQLite when using - /// the outside of . - /// - /// - /// Note that it is unusual to use this method. - /// Consider using in the normal way instead. - /// + /// Call this method to build a for SQLite when using + /// the outside of . /// + /// + /// Note that it is unusual to use this method. + /// Consider using in the normal way instead. + /// /// The convention set. public static ConventionSet Build() { @@ -76,14 +74,12 @@ public static ConventionSet Build() } /// - /// - /// Call this method to build a for SQLite outside of . - /// - /// - /// Note that it is unusual to use this method. - /// Consider using in the normal way instead. - /// + /// Call this method to build a for SQLite outside of . /// + /// + /// Note that it is unusual to use this method. + /// Consider using in the normal way instead. + /// /// The convention set. public static ModelBuilder CreateModelBuilder() { diff --git a/src/EFCore.Sqlite.Core/Metadata/Internal/SqliteAnnotationProvider.cs b/src/EFCore.Sqlite.Core/Metadata/Internal/SqliteAnnotationProvider.cs index 48f1ecfb793..de7f7837e39 100644 --- a/src/EFCore.Sqlite.Core/Metadata/Internal/SqliteAnnotationProvider.cs +++ b/src/EFCore.Sqlite.Core/Metadata/Internal/SqliteAnnotationProvider.cs @@ -12,18 +12,16 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Metadata.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqliteAnnotationProvider : RelationalAnnotationProvider { /// diff --git a/src/EFCore.Sqlite.Core/Migrations/Internal/SqliteHistoryRepository.cs b/src/EFCore.Sqlite.Core/Migrations/Internal/SqliteHistoryRepository.cs index cfc83a062fc..f18c04f93f9 100644 --- a/src/EFCore.Sqlite.Core/Migrations/Internal/SqliteHistoryRepository.cs +++ b/src/EFCore.Sqlite.Core/Migrations/Internal/SqliteHistoryRepository.cs @@ -10,19 +10,17 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Migrations.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class SqliteHistoryRepository : HistoryRepository { /// diff --git a/src/EFCore.Sqlite.Core/Migrations/SqliteMigrationsSqlGenerator.cs b/src/EFCore.Sqlite.Core/Migrations/SqliteMigrationsSqlGenerator.cs index a795487e7e7..55049a9d1da 100644 --- a/src/EFCore.Sqlite.Core/Migrations/SqliteMigrationsSqlGenerator.cs +++ b/src/EFCore.Sqlite.Core/Migrations/SqliteMigrationsSqlGenerator.cs @@ -19,19 +19,19 @@ namespace Microsoft.EntityFrameworkCore.Migrations { /// - /// - /// SQLite-specific implementation of . - /// + /// SQLite-specific implementation of . + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Database migrations, and - /// Accessing SQLite databases with EF Core for more information. + /// + /// See Database migrations, and + /// Accessing SQLite databases with EF Core for more information. + /// /// public class SqliteMigrationsSqlGenerator : MigrationsSqlGenerator { diff --git a/src/EFCore.Sqlite.Core/Storage/Internal/ISqliteRelationalConnection.cs b/src/EFCore.Sqlite.Core/Storage/Internal/ISqliteRelationalConnection.cs index 81ae8a652b3..63b0fc57337 100644 --- a/src/EFCore.Sqlite.Core/Storage/Internal/ISqliteRelationalConnection.cs +++ b/src/EFCore.Sqlite.Core/Storage/Internal/ISqliteRelationalConnection.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface ISqliteRelationalConnection : IRelationalConnection { /// diff --git a/src/EFCore.Sqlite.Core/Storage/Internal/SqliteDatabaseCreator.cs b/src/EFCore.Sqlite.Core/Storage/Internal/SqliteDatabaseCreator.cs index c42965f238b..36e826ec872 100644 --- a/src/EFCore.Sqlite.Core/Storage/Internal/SqliteDatabaseCreator.cs +++ b/src/EFCore.Sqlite.Core/Storage/Internal/SqliteDatabaseCreator.cs @@ -11,19 +11,17 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class SqliteDatabaseCreator : RelationalDatabaseCreator { // ReSharper disable once InconsistentNaming diff --git a/src/EFCore.Sqlite.Core/Storage/Internal/SqliteRelationalConnection.cs b/src/EFCore.Sqlite.Core/Storage/Internal/SqliteRelationalConnection.cs index e521c8e9b75..48d00281c0b 100644 --- a/src/EFCore.Sqlite.Core/Storage/Internal/SqliteRelationalConnection.cs +++ b/src/EFCore.Sqlite.Core/Storage/Internal/SqliteRelationalConnection.cs @@ -18,19 +18,17 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class SqliteRelationalConnection : RelationalConnection, ISqliteRelationalConnection { private readonly IRawSqlCommandBuilder _rawSqlCommandBuilder; @@ -94,8 +92,7 @@ public virtual ISqliteRelationalConnection CreateReadOnlyConnection() { var connectionStringBuilder = new SqliteConnectionStringBuilder(GetValidatedConnectionString()) { - Mode = SqliteOpenMode.ReadOnly, - Pooling = false + Mode = SqliteOpenMode.ReadOnly, Pooling = false }; var contextOptions = new DbContextOptionsBuilder().UseSqlite(connectionStringBuilder.ToString()).Options; @@ -120,36 +117,36 @@ private void InitializeDbConnection(DbConnection connection) sqliteConnection.CreateFunction( "regexp", (pattern, input) => + { + if (input == null + || pattern == null) { - if (input == null - || pattern == null) - { - return null; - } - - return Regex.IsMatch(input, pattern); - }, + return null; + } + + return Regex.IsMatch(input, pattern); + }, isDeterministic: true); sqliteConnection.CreateFunction( "ef_mod", (dividend, divisor) => + { + if (dividend == null + || divisor == null) + { + return null; + } + + if (dividend is string s) { - if (dividend == null - || divisor == null) - { - return null; - } - - if (dividend is string s) - { - return decimal.Parse(s, CultureInfo.InvariantCulture) - % Convert.ToDecimal(divisor, CultureInfo.InvariantCulture); - } - - return Convert.ToDouble(dividend, CultureInfo.InvariantCulture) - % Convert.ToDouble(divisor, CultureInfo.InvariantCulture); - }, + return decimal.Parse(s, CultureInfo.InvariantCulture) + % Convert.ToDecimal(divisor, CultureInfo.InvariantCulture); + } + + return Convert.ToDouble(dividend, CultureInfo.InvariantCulture) + % Convert.ToDouble(divisor, CultureInfo.InvariantCulture); + }, isDeterministic: true); sqliteConnection.CreateFunction( diff --git a/src/EFCore.Sqlite.Core/Storage/Internal/SqliteSqlGenerationHelper.cs b/src/EFCore.Sqlite.Core/Storage/Internal/SqliteSqlGenerationHelper.cs index 720bbccf36e..db41ea92001 100644 --- a/src/EFCore.Sqlite.Core/Storage/Internal/SqliteSqlGenerationHelper.cs +++ b/src/EFCore.Sqlite.Core/Storage/Internal/SqliteSqlGenerationHelper.cs @@ -8,18 +8,16 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqliteSqlGenerationHelper : RelationalSqlGenerationHelper { /// diff --git a/src/EFCore.Sqlite.Core/Storage/Internal/SqliteTypeMappingSource.cs b/src/EFCore.Sqlite.Core/Storage/Internal/SqliteTypeMappingSource.cs index f66b06ce39b..955f96a7592 100644 --- a/src/EFCore.Sqlite.Core/Storage/Internal/SqliteTypeMappingSource.cs +++ b/src/EFCore.Sqlite.Core/Storage/Internal/SqliteTypeMappingSource.cs @@ -10,18 +10,16 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqliteTypeMappingSource : RelationalTypeMappingSource { private static readonly HashSet _spatialiteTypes diff --git a/src/EFCore.Sqlite.Core/Update/Internal/SqliteModificationCommandBatchFactory.cs b/src/EFCore.Sqlite.Core/Update/Internal/SqliteModificationCommandBatchFactory.cs index 26606aa1c4a..e1ebd259b26 100644 --- a/src/EFCore.Sqlite.Core/Update/Internal/SqliteModificationCommandBatchFactory.cs +++ b/src/EFCore.Sqlite.Core/Update/Internal/SqliteModificationCommandBatchFactory.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Update.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class SqliteModificationCommandBatchFactory : IModificationCommandBatchFactory { /// diff --git a/src/EFCore.Sqlite.Core/Update/Internal/SqliteUpdateSqlGenerator.cs b/src/EFCore.Sqlite.Core/Update/Internal/SqliteUpdateSqlGenerator.cs index 8bcb10b3cb1..2bac49f918d 100644 --- a/src/EFCore.Sqlite.Core/Update/Internal/SqliteUpdateSqlGenerator.cs +++ b/src/EFCore.Sqlite.Core/Update/Internal/SqliteUpdateSqlGenerator.cs @@ -11,18 +11,16 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Update.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqliteUpdateSqlGenerator : UpdateSqlGenerator { /// diff --git a/src/EFCore.Sqlite.NTS/Query/Internal/SqliteNetTopologySuiteMemberTranslatorPlugin.cs b/src/EFCore.Sqlite.NTS/Query/Internal/SqliteNetTopologySuiteMemberTranslatorPlugin.cs index 7ad1757a79d..662e30f5251 100644 --- a/src/EFCore.Sqlite.NTS/Query/Internal/SqliteNetTopologySuiteMemberTranslatorPlugin.cs +++ b/src/EFCore.Sqlite.NTS/Query/Internal/SqliteNetTopologySuiteMemberTranslatorPlugin.cs @@ -7,12 +7,10 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Query.Internal { /// - /// - /// 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. - /// + /// 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. /// public class SqliteNetTopologySuiteMemberTranslatorPlugin : IMemberTranslatorPlugin { diff --git a/src/EFCore.Sqlite.NTS/Query/Internal/SqliteNetTopologySuiteMethodCallTranslatorPlugin.cs b/src/EFCore.Sqlite.NTS/Query/Internal/SqliteNetTopologySuiteMethodCallTranslatorPlugin.cs index cb23c5a439a..38fe4e790be 100644 --- a/src/EFCore.Sqlite.NTS/Query/Internal/SqliteNetTopologySuiteMethodCallTranslatorPlugin.cs +++ b/src/EFCore.Sqlite.NTS/Query/Internal/SqliteNetTopologySuiteMethodCallTranslatorPlugin.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means a single instance of each service is used by many - /// instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means a single instance of each service is used by many + /// instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqliteNetTopologySuiteMethodCallTranslatorPlugin : IMethodCallTranslatorPlugin { /// diff --git a/src/EFCore.Sqlite.NTS/Storage/Internal/SqliteNetTopologySuiteTypeMappingSourcePlugin.cs b/src/EFCore.Sqlite.NTS/Storage/Internal/SqliteNetTopologySuiteTypeMappingSourcePlugin.cs index 21a7aa8dfe9..7fc2165d66a 100644 --- a/src/EFCore.Sqlite.NTS/Storage/Internal/SqliteNetTopologySuiteTypeMappingSourcePlugin.cs +++ b/src/EFCore.Sqlite.NTS/Storage/Internal/SqliteNetTopologySuiteTypeMappingSourcePlugin.cs @@ -12,19 +12,17 @@ namespace Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means a single instance of each service is used by many - /// instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means a single instance of each service is used by many + /// instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SqliteNetTopologySuiteTypeMappingSourcePlugin : IRelationalTypeMappingSourcePlugin { private static readonly Dictionary _storeTypeMappings = new(StringComparer.OrdinalIgnoreCase) diff --git a/src/EFCore/ChangeTracking/ArrayStructuralComparer.cs b/src/EFCore/ChangeTracking/ArrayStructuralComparer.cs index 7a7bc9cd0c3..d8cb59bc652 100644 --- a/src/EFCore/ChangeTracking/ArrayStructuralComparer.cs +++ b/src/EFCore/ChangeTracking/ArrayStructuralComparer.cs @@ -6,10 +6,8 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Specifies value comparison for arrays where each element pair is compared. - /// A new array is constructed when snapshotting. - /// + /// Specifies value comparison for arrays where each element pair is compared. + /// A new array is constructed when snapshotting. /// /// /// See EF Core value comparers for more information. diff --git a/src/EFCore/ChangeTracking/ChangeTracker.cs b/src/EFCore/ChangeTracking/ChangeTracker.cs index f973c48d008..4109a30b2c2 100644 --- a/src/EFCore/ChangeTracking/ChangeTracker.cs +++ b/src/EFCore/ChangeTracking/ChangeTracker.cs @@ -67,40 +67,36 @@ public ChangeTracker( } /// - /// - /// Gets or sets a value indicating whether the method is called - /// automatically by methods of and related classes. - /// - /// - /// The default value is true. This ensures the context is aware of any changes to tracked entity instances - /// before performing operations such as or returning change tracking - /// information. If you disable automatic detect changes then you must ensure that - /// is called when entity instances have been modified. - /// Failure to do so may result in some changes not being persisted during - /// or out-of-date change tracking information being returned. - /// + /// Gets or sets a value indicating whether the method is called + /// automatically by methods of and related classes. /// + /// + /// The default value is true. This ensures the context is aware of any changes to tracked entity instances + /// before performing operations such as or returning change tracking + /// information. If you disable automatic detect changes then you must ensure that + /// is called when entity instances have been modified. + /// Failure to do so may result in some changes not being persisted during + /// or out-of-date change tracking information being returned. + /// public virtual bool AutoDetectChangesEnabled { get; set; } = true; /// - /// - /// Gets or sets a value indicating whether navigation properties for tracked entities - /// will be loaded on first access. - /// - /// - /// The default value is true. However, lazy loading will only occur for navigation properties - /// of entities that have also been configured in the model for lazy loading. - /// + /// Gets or sets a value indicating whether navigation properties for tracked entities + /// will be loaded on first access. /// + /// + /// The default value is true. However, lazy loading will only occur for navigation properties + /// of entities that have also been configured in the model for lazy loading. + /// public virtual bool LazyLoadingEnabled { get; set; } = true; /// - /// - /// Gets or sets the tracking behavior for LINQ queries run against the context. Disabling change tracking - /// is useful for read-only scenarios because it avoids the overhead of setting up change tracking for each - /// entity instance. You should not disable change tracking if you want to manipulate entity instances and - /// persist those changes to the database using . - /// + /// Gets or sets the tracking behavior for LINQ queries run against the context. Disabling change tracking + /// is useful for read-only scenarios because it avoids the overhead of setting up change tracking for each + /// entity instance. You should not disable change tracking if you want to manipulate entity instances and + /// persist those changes to the database using . + /// + /// /// /// This method sets the default behavior for the context, but you can override this behavior for individual /// queries using the @@ -110,7 +106,7 @@ public ChangeTracker( /// The default value is . This means the change tracker will /// keep track of changes for all entities that are returned from a LINQ query. /// - /// + /// public virtual QueryTrackingBehavior QueryTrackingBehavior { get => _queryTrackingBehavior; @@ -118,18 +114,16 @@ public virtual QueryTrackingBehavior QueryTrackingBehavior } /// - /// - /// Gets or sets a value indicating when a dependent/child entity will have its state - /// set to once severed from a parent/principal entity - /// through either a navigation or foreign key property being set to null. The default - /// value is . - /// - /// - /// Dependent/child entities are only deleted automatically when the relationship - /// is configured with . This is set by default - /// for required relationships. - /// + /// Gets or sets a value indicating when a dependent/child entity will have its state + /// set to once severed from a parent/principal entity + /// through either a navigation or foreign key property being set to null. The default + /// value is . /// + /// + /// Dependent/child entities are only deleted automatically when the relationship + /// is configured with . This is set by default + /// for required relationships. + /// public virtual CascadeTiming DeleteOrphansTiming { get => StateManager.DeleteOrphansTiming; @@ -137,17 +131,15 @@ public virtual CascadeTiming DeleteOrphansTiming } /// - /// - /// Gets or sets a value indicating when a dependent/child entity will have its state - /// set to once its parent/principal entity has been marked - /// as . The default value is. - /// - /// - /// Dependent/child entities are only deleted automatically when the relationship - /// is configured with . This is set by default - /// for required relationships. - /// + /// Gets or sets a value indicating when a dependent/child entity will have its state + /// set to once its parent/principal entity has been marked + /// as . The default value is. /// + /// + /// Dependent/child entities are only deleted automatically when the relationship + /// is configured with . This is set by default + /// for required relationships. + /// public virtual CascadeTiming CascadeDeleteTiming { get => StateManager.CascadeDeleteTiming; @@ -155,10 +147,10 @@ public virtual CascadeTiming CascadeDeleteTiming } /// - /// - /// Returns an for each entity being tracked by the context. - /// The entries provide access to change tracking information and operations for each entity. - /// + /// Returns an for each entity being tracked by the context. + /// The entries provide access to change tracking information and operations for each entity. + /// + /// /// /// This method calls to ensure all entries returned reflect up-to-date state. /// Use to prevent DetectChanges from being called automatically. @@ -168,7 +160,7 @@ public virtual CascadeTiming CascadeDeleteTiming /// an indicating that the collection was modified while enumerating. /// To avoid this, create a defensive copy using or similar before iterating. /// - /// + /// /// An entry for each entity being tracked. public virtual IEnumerable Entries() { @@ -202,16 +194,14 @@ private void TryDetectChanges() } /// - /// - /// Checks if any new, deleted, or changed entities are being tracked - /// such that these changes will be sent to the database if - /// or is called. - /// - /// - /// Note that this method calls unless - /// has been set to . - /// + /// Checks if any new, deleted, or changed entities are being tracked + /// such that these changes will be sent to the database if + /// or is called. /// + /// + /// Note that this method calls unless + /// has been set to . + /// /// if there are changes to save, otherwise . public virtual bool HasChanges() { @@ -248,13 +238,13 @@ public virtual void AcceptAllChanges() => StateManager.AcceptAllChanges(); /// - /// - /// Begins tracking an entity and any entities that are reachable by traversing its navigation properties. - /// Traversal is recursive so the navigation properties of any discovered entities will also be scanned. - /// The specified is called for each discovered entity and must set the - /// that each entity should be tracked in. If no state is set, the entity - /// remains untracked. - /// + /// Begins tracking an entity and any entities that are reachable by traversing its navigation properties. + /// Traversal is recursive so the navigation properties of any discovered entities will also be scanned. + /// The specified is called for each discovered entity and must set the + /// that each entity should be tracked in. If no state is set, the entity + /// remains untracked. + /// + /// /// /// This method is designed for use in disconnected scenarios where entities are retrieved using one instance of /// the context and then changes are saved using a different instance of the context. An example of this is a @@ -266,7 +256,7 @@ public virtual void AcceptAllChanges() /// If an entity is discovered that is already tracked by the context, that entity is not processed (and its /// navigation properties are not traversed). /// - /// + /// /// The entity to begin traversal from. /// /// An action to configure the change tracking information for each entity. For the entity to begin being tracked, @@ -279,25 +269,25 @@ public virtual void TrackGraph( rootEntity, callback, n => + { + if (n.Entry.State != EntityState.Detached) { - if (n.Entry.State != EntityState.Detached) - { - return false; - } + return false; + } - n.NodeState!(n); + n.NodeState!(n); - return n.Entry.State != EntityState.Detached; - }); + return n.Entry.State != EntityState.Detached; + }); /// - /// - /// Begins tracking an entity and any entities that are reachable by traversing its navigation properties. - /// Traversal is recursive so the navigation properties of any discovered entities will also be scanned. - /// The specified is called for each discovered entity and must set the - /// that each entity should be tracked in. If no state is set, the entity - /// remains untracked. - /// + /// Begins tracking an entity and any entities that are reachable by traversing its navigation properties. + /// Traversal is recursive so the navigation properties of any discovered entities will also be scanned. + /// The specified is called for each discovered entity and must set the + /// that each entity should be tracked in. If no state is set, the entity + /// remains untracked. + /// + /// /// /// This method is designed for use in disconnected scenarios where entities are retrieved using one instance of /// the context and then changes are saved using a different instance of the context. An example of this is a @@ -312,7 +302,7 @@ public virtual void TrackGraph( /// allows the callback to decide when traversal will end, but the onus is then on the caller to ensure that /// traversal will not enter an infinite loop. /// - /// + /// /// The entity to begin traversal from. /// An arbitrary state object passed to the callback. /// @@ -365,15 +355,13 @@ public event EventHandler Tracked } /// - /// - /// An event fired when an entity that is tracked by the associated has moved - /// from one to another. - /// - /// - /// Note that this event does not fire for entities when they are first tracked by the context. - /// Use the event to get notified when the context begins tracking an entity. - /// + /// An event fired when an entity that is tracked by the associated has moved + /// from one to another. /// + /// + /// Note that this event does not fire for entities when they are first tracked by the context. + /// Use the event to get notified when the context begins tracking an entity. + /// public event EventHandler StateChanged { add => StateManager.StateChanged += value; @@ -381,11 +369,11 @@ public event EventHandler StateChanged } /// - /// - /// Forces immediate cascading deletion of child/dependent entities when they are either - /// severed from a required parent/principal entity, or the required parent/principal entity - /// is itself deleted. See . - /// + /// Forces immediate cascading deletion of child/dependent entities when they are either + /// severed from a required parent/principal entity, or the required parent/principal entity + /// is itself deleted. See . + /// + /// /// /// This method is usually used when and/or /// have been set to @@ -395,7 +383,7 @@ public event EventHandler StateChanged /// If is then this method /// will call . /// - /// + /// public virtual void CascadeChanges() { if (AutoDetectChangesEnabled) @@ -424,9 +412,9 @@ Task IResettableService.ResetStateAsync(CancellationToken cancellationToken) } /// - /// - /// Stops tracking all currently tracked entities. - /// + /// Stops tracking all currently tracked entities. + /// + /// /// /// is designed to have a short lifetime where a new instance is created for each unit-of-work. /// This manner means all tracked entities are discarded when the context is disposed at the end of each unit-of-work. @@ -441,7 +429,7 @@ Task IResettableService.ResetStateAsync(CancellationToken cancellationToken) /// /// Note that this method does not generate events since entities are not individually detached. /// - /// + /// public virtual void Clear() => StateManager.Clear(); diff --git a/src/EFCore/ChangeTracking/CollectionEntry.cs b/src/EFCore/ChangeTracking/CollectionEntry.cs index 6219ece070a..14c43d5ec02 100644 --- a/src/EFCore/ChangeTracking/CollectionEntry.cs +++ b/src/EFCore/ChangeTracking/CollectionEntry.cs @@ -15,19 +15,19 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Provides access to change tracking and loading information for a collection - /// navigation property that associates this entity to a collection of another entities. - /// + /// Provides access to change tracking and loading information for a collection + /// navigation property that associates this entity to a collection of another entities. + /// + /// /// /// Instances of this class are returned from methods when using the API and it is /// not designed to be directly constructed in your application code. /// - /// - /// - /// See Accessing tracked entities in EF Core, - /// Changing foreign keys and navigations, - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core, + /// Changing foreign keys and navigations, + /// and Loading related entities for more information. + /// /// public class CollectionEntry : NavigationEntry { @@ -207,17 +207,17 @@ public override bool IsModified } /// + /// Loads the entities referenced by this navigation property, unless + /// is already set to true. + /// + /// /// - /// Loads the entities referenced by this navigation property, unless - /// is already set to true. + /// Note that entities that are already being tracked are not overwritten with new data from the database. /// /// - /// Note that entities that are already being tracked are not overwritten with new data from the database. + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. /// public override void Load() { @@ -230,10 +230,10 @@ public override void Load() } /// - /// - /// Loads entities referenced by this navigation property, unless - /// is already set to true. - /// + /// Loads entities referenced by this navigation property, unless + /// is already set to true. + /// + /// /// /// Note that entities that are already being tracked are not overwritten with new data from the database. /// @@ -241,10 +241,10 @@ public override void Load() /// Multiple active operations on the same context instance are not supported. Use to ensure /// that any asynchronous operations have completed before calling another method on this context. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// /// A to observe while waiting for the task to complete. /// A task that represents the asynchronous save operation. @@ -259,18 +259,18 @@ public override Task LoadAsync(CancellationToken cancellationToken = default) } /// - /// - /// Returns the query that would be used by to load entities referenced by - /// this navigation property. - /// + /// Returns the query that would be used by to load entities referenced by + /// this navigation property. + /// + /// /// /// The query can be composed over using LINQ to perform filtering, counting, etc. without /// actually loading all entities from the database. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// public override IQueryable Query() { diff --git a/src/EFCore/ChangeTracking/CollectionEntry`.cs b/src/EFCore/ChangeTracking/CollectionEntry`.cs index 5d2abc1fba6..76b871df17e 100644 --- a/src/EFCore/ChangeTracking/CollectionEntry`.cs +++ b/src/EFCore/ChangeTracking/CollectionEntry`.cs @@ -10,19 +10,19 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Provides access to change tracking and loading information for a collection - /// navigation property that associates this entity to a collection of another entities. - /// + /// Provides access to change tracking and loading information for a collection + /// navigation property that associates this entity to a collection of another entities. + /// + /// /// /// Instances of this class are returned from methods when using the API and it is /// not designed to be directly constructed in your application code. /// - /// - /// - /// See Accessing tracked entities in EF Core, - /// Changing foreign keys and navigations, - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core, + /// Changing foreign keys and navigations, + /// and Loading related entities for more information. + /// /// /// The type of the entity the property belongs to. /// The type of the property. @@ -81,18 +81,18 @@ public CollectionEntry(InternalEntityEntry internalEntry, INavigation navigation } /// - /// - /// Returns the query that would be used by to load entities referenced by - /// this navigation property. - /// + /// Returns the query that would be used by to load entities referenced by + /// this navigation property. + /// + /// /// /// The query can be composed over using LINQ to perform filtering, counting, etc. without /// actually loading all entities from the database. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// public new virtual IQueryable Query() { diff --git a/src/EFCore/ChangeTracking/EntityEntry.cs b/src/EFCore/ChangeTracking/EntityEntry.cs index 7eace088f65..56a3312700f 100644 --- a/src/EFCore/ChangeTracking/EntityEntry.cs +++ b/src/EFCore/ChangeTracking/EntityEntry.cs @@ -20,16 +20,16 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Provides access to change tracking information and operations for a given entity. - /// + /// Provides access to change tracking information and operations for a given entity. + /// + /// /// /// Instances of this class are returned from methods when using the API and it is /// not designed to be directly constructed in your application code. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// [DebuggerDisplay("{" + nameof(InternalEntry) + ",nq}")] public class EntityEntry : IInfrastructure @@ -67,9 +67,9 @@ public virtual object Entity => InternalEntry.Entity; /// - /// - /// Gets or sets that state that this entity is being tracked in. - /// + /// Gets or sets that state that this entity is being tracked in. + /// + /// /// /// This method sets only the state of the single entity represented by this entry. It does /// not change the state of other entities reachable from this one. @@ -80,9 +80,9 @@ public virtual object Entity /// of its current state. This is different than calling where the entity /// will be disconnected (rather than marked for deletion) if it is in the state. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// public virtual EntityState State { @@ -343,9 +343,9 @@ public virtual IEnumerable Collections } /// - /// - /// Gets a value indicating if the key values of this entity have been assigned a value. - /// + /// Gets a value indicating if the key values of this entity have been assigned a value. + /// + /// /// /// For keys with store-generated properties (e.g. mapping to Identity columns), the /// return value will be false if any of the store-generated properties have the @@ -355,9 +355,9 @@ public virtual IEnumerable Collections /// For keys without any store-generated properties, the return value will always be /// true since any value is considered a valid key value. /// - /// - /// - /// See EF Core change tracking for more information. + /// + /// See EF Core change tracking for more information. + /// /// public virtual bool IsKeySet => InternalEntry.IsKeySet.IsSet; @@ -376,18 +376,18 @@ public virtual PropertyValues CurrentValues } /// - /// - /// Gets the original property values for this entity. The original values are the property - /// values as they were when the entity was retrieved from the database. - /// + /// Gets the original property values for this entity. The original values are the property + /// values as they were when the entity was retrieved from the database. + /// + /// /// /// Note that whenever real original property values are not available (e.g. entity was not yet /// persisted to the database or was retrieved in a non-tracking query) this will default to the /// current property values of this entity. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// /// The original values. public virtual PropertyValues OriginalValues @@ -397,17 +397,17 @@ public virtual PropertyValues OriginalValues } /// - /// - /// Queries the database for copies of the values of the tracked entity as they currently - /// exist in the database. If the entity is not found in the database, then is returned. - /// + /// Queries the database for copies of the values of the tracked entity as they currently + /// exist in the database. If the entity is not found in the database, then is returned. + /// + /// /// /// Note that changing the values in the returned dictionary will not update the values /// in the database. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// /// The store values, or if the entity does not exist in the database. public virtual PropertyValues? GetDatabaseValues() @@ -418,10 +418,10 @@ public virtual PropertyValues OriginalValues } /// - /// - /// Queries the database for copies of the values of the tracked entity as they currently - /// exist in the database. If the entity is not found in the database, then null is returned. - /// + /// Queries the database for copies of the values of the tracked entity as they currently + /// exist in the database. If the entity is not found in the database, then null is returned. + /// + /// /// /// Note that changing the values in the returned dictionary will not update the values /// in the database. @@ -430,9 +430,9 @@ public virtual PropertyValues OriginalValues /// Multiple active operations on the same context instance are not supported. Use to ensure /// that any asynchronous operations have completed before calling another method on this context. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// /// A to observe while waiting for the task to complete. /// @@ -448,9 +448,9 @@ public virtual PropertyValues OriginalValues } /// - /// - /// Reloads the entity from the database overwriting any property values with values from the database. - /// + /// Reloads the entity from the database overwriting any property values with values from the database. + /// + /// /// /// The entity will be in the state after calling this method, /// unless the entity does not exist in the database, in which case the entity will be @@ -458,17 +458,17 @@ public virtual PropertyValues OriginalValues /// entity that does not exist in the database is a no-op. Note, however, that an Added entity may /// not yet have had its permanent key value created. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// public virtual void Reload() => Reload(GetDatabaseValues()); /// - /// - /// Reloads the entity from the database overwriting any property values with values from the database. - /// + /// Reloads the entity from the database overwriting any property values with values from the database. + /// + /// /// /// The entity will be in the state after calling this method, /// unless the entity does not exist in the database, in which case the entity will be @@ -476,9 +476,9 @@ public virtual void Reload() /// entity that does not exist in the database is a no-op. Note, however, that an Added entity may /// not yet have had its permanent key value created. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// /// A to observe while waiting for the task to complete. /// A task that represents the asynchronous operation. @@ -524,8 +524,10 @@ public override string ToString() /// /// /// - /// See EF Core change tracking and - /// EF Core debug views for more information. + /// + /// See EF Core change tracking and + /// EF Core debug views for more information. + /// /// public virtual DebugView DebugView => new( diff --git a/src/EFCore/ChangeTracking/EntityEntryGraphNode.cs b/src/EFCore/ChangeTracking/EntityEntryGraphNode.cs index 0899fbbd9a4..f670622dc9f 100644 --- a/src/EFCore/ChangeTracking/EntityEntryGraphNode.cs +++ b/src/EFCore/ChangeTracking/EntityEntryGraphNode.cs @@ -10,16 +10,16 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// + /// Provides access to change tracking information and operations for a node in a + /// graph of entities that is being traversed. + /// + /// /// - /// Provides access to change tracking information and operations for a node in a - /// graph of entities that is being traversed. + /// See for information on how graph nodes are used. /// /// - /// See for information on how graph nodes are used. + /// See Tracking entities in EF Core for more information. /// - /// - /// - /// See Tracking entities in EF Core for more information. /// public class EntityEntryGraphNode : IInfrastructure { @@ -47,35 +47,29 @@ public EntityEntryGraphNode( } /// - /// - /// An for the entity instance from which a navigation property was traversed to the instance - /// represented by this node. - /// - /// - /// See for information on how graph nodes are used. - /// + /// An for the entity instance from which a navigation property was traversed to the instance + /// represented by this node. /// + /// + /// See for information on how graph nodes are used. + /// public virtual EntityEntry? SourceEntry => _sourceEntry == null ? null : new EntityEntry(_sourceEntry); /// - /// - /// Gets the navigation property that is being traversed to reach this node in the graph. - /// - /// - /// See for information on how graph nodes are used. - /// + /// Gets the navigation property that is being traversed to reach this node in the graph. /// + /// + /// See for information on how graph nodes are used. + /// public virtual INavigationBase? InboundNavigation { get; } /// - /// - /// An for the entity instance represented by this node. - /// - /// - /// See for information on how graph nodes are used. - /// + /// An for the entity instance represented by this node. /// + /// + /// See for information on how graph nodes are used. + /// public virtual EntityEntry Entry => new(_entry); @@ -88,6 +82,14 @@ public virtual EntityEntry Entry /// application code. /// /// + /// + /// + /// 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. + /// + /// [EntityFrameworkInternal] InternalEntityEntry IInfrastructure.Instance => _entry; diff --git a/src/EFCore/ChangeTracking/EntityEntry`.cs b/src/EFCore/ChangeTracking/EntityEntry`.cs index a028819644c..02dc690ff4a 100644 --- a/src/EFCore/ChangeTracking/EntityEntry`.cs +++ b/src/EFCore/ChangeTracking/EntityEntry`.cs @@ -14,16 +14,16 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Provides access to change tracking information and operations for a given entity. - /// + /// Provides access to change tracking information and operations for a given entity. + /// + /// /// /// Instances of this class are returned from methods when using the API and it is /// not designed to be directly constructed in your application code. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// /// The type of entity being tracked by this entry. public class EntityEntry : EntityEntry diff --git a/src/EFCore/ChangeTracking/IEntityEntryGraphIterator.cs b/src/EFCore/ChangeTracking/IEntityEntryGraphIterator.cs index 2ffb931dbfe..374d64fc3b5 100644 --- a/src/EFCore/ChangeTracking/IEntityEntryGraphIterator.cs +++ b/src/EFCore/ChangeTracking/IEntityEntryGraphIterator.cs @@ -9,17 +9,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// A service to traverse a graph of entities and perform some action on at each node. - /// + /// A service to traverse a graph of entities and perform some action on at each node. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Tracking entities in EF Core for more information. + /// + /// See Tracking entities in EF Core for more information. + /// /// public interface IEntityEntryGraphIterator { diff --git a/src/EFCore/ChangeTracking/Internal/ChangeDetector.cs b/src/EFCore/ChangeTracking/Internal/ChangeDetector.cs index d1e9fe3df6e..c265127d4ff 100644 --- a/src/EFCore/ChangeTracking/Internal/ChangeDetector.cs +++ b/src/EFCore/ChangeTracking/Internal/ChangeDetector.cs @@ -15,19 +15,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class ChangeDetector : IChangeDetector { private readonly IDiagnosticsLogger _logger; diff --git a/src/EFCore/ChangeTracking/Internal/ChangeTrackerFactory.cs b/src/EFCore/ChangeTracking/Internal/ChangeTrackerFactory.cs index 91981520f69..6d04a7c19ba 100644 --- a/src/EFCore/ChangeTracking/Internal/ChangeTrackerFactory.cs +++ b/src/EFCore/ChangeTracking/Internal/ChangeTrackerFactory.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class ChangeTrackerFactory : IChangeTrackerFactory { private readonly DbContext _context; diff --git a/src/EFCore/ChangeTracking/Internal/EntityEntryGraphIterator.cs b/src/EFCore/ChangeTracking/Internal/EntityEntryGraphIterator.cs index 3391bb950fb..2c3a1e8eea0 100644 --- a/src/EFCore/ChangeTracking/Internal/EntityEntryGraphIterator.cs +++ b/src/EFCore/ChangeTracking/Internal/EntityEntryGraphIterator.cs @@ -13,18 +13,16 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class EntityEntryGraphIterator : IEntityEntryGraphIterator { /// diff --git a/src/EFCore/ChangeTracking/Internal/EntityGraphAttacher.cs b/src/EFCore/ChangeTracking/Internal/EntityGraphAttacher.cs index d2303c1cf1d..86492ae44ab 100644 --- a/src/EFCore/ChangeTracking/Internal/EntityGraphAttacher.cs +++ b/src/EFCore/ChangeTracking/Internal/EntityGraphAttacher.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class EntityGraphAttacher : IEntityGraphAttacher { private readonly IEntityEntryGraphIterator _graphIterator; diff --git a/src/EFCore/ChangeTracking/Internal/IChangeDetector.cs b/src/EFCore/ChangeTracking/Internal/IChangeDetector.cs index 66012448205..88fc19c3548 100644 --- a/src/EFCore/ChangeTracking/Internal/IChangeDetector.cs +++ b/src/EFCore/ChangeTracking/Internal/IChangeDetector.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IChangeDetector { /// diff --git a/src/EFCore/ChangeTracking/Internal/IChangeTrackerFactory.cs b/src/EFCore/ChangeTracking/Internal/IChangeTrackerFactory.cs index 2294e57851e..a8118b59968 100644 --- a/src/EFCore/ChangeTracking/Internal/IChangeTrackerFactory.cs +++ b/src/EFCore/ChangeTracking/Internal/IChangeTrackerFactory.cs @@ -6,19 +6,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IChangeTrackerFactory { /// diff --git a/src/EFCore/ChangeTracking/Internal/IEntityGraphAttacher.cs b/src/EFCore/ChangeTracking/Internal/IEntityGraphAttacher.cs index a05e9b48f6a..7b38707367f 100644 --- a/src/EFCore/ChangeTracking/Internal/IEntityGraphAttacher.cs +++ b/src/EFCore/ChangeTracking/Internal/IEntityGraphAttacher.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IEntityGraphAttacher { /// diff --git a/src/EFCore/ChangeTracking/Internal/IInternalEntityEntryNotifier.cs b/src/EFCore/ChangeTracking/Internal/IInternalEntityEntryNotifier.cs index b8f076028d7..a3fd0b50147 100644 --- a/src/EFCore/ChangeTracking/Internal/IInternalEntityEntryNotifier.cs +++ b/src/EFCore/ChangeTracking/Internal/IInternalEntityEntryNotifier.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IInternalEntityEntryNotifier { /// diff --git a/src/EFCore/ChangeTracking/Internal/IInternalEntityEntrySubscriber.cs b/src/EFCore/ChangeTracking/Internal/IInternalEntityEntrySubscriber.cs index 8b8b7ed73a1..25110e3bc8b 100644 --- a/src/EFCore/ChangeTracking/Internal/IInternalEntityEntrySubscriber.cs +++ b/src/EFCore/ChangeTracking/Internal/IInternalEntityEntrySubscriber.cs @@ -6,18 +6,16 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IInternalEntityEntrySubscriber { /// diff --git a/src/EFCore/ChangeTracking/Internal/IKeyPropagator.cs b/src/EFCore/ChangeTracking/Internal/IKeyPropagator.cs index c309042b24e..d43cbd9a11e 100644 --- a/src/EFCore/ChangeTracking/Internal/IKeyPropagator.cs +++ b/src/EFCore/ChangeTracking/Internal/IKeyPropagator.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IKeyPropagator { /// diff --git a/src/EFCore/ChangeTracking/Internal/ILocalViewListener.cs b/src/EFCore/ChangeTracking/Internal/ILocalViewListener.cs index 5b6e571fade..e076d735938 100644 --- a/src/EFCore/ChangeTracking/Internal/ILocalViewListener.cs +++ b/src/EFCore/ChangeTracking/Internal/ILocalViewListener.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface ILocalViewListener { /// diff --git a/src/EFCore/ChangeTracking/Internal/INavigationFixer.cs b/src/EFCore/ChangeTracking/Internal/INavigationFixer.cs index caa5ce6c30f..09f833ef1a4 100644 --- a/src/EFCore/ChangeTracking/Internal/INavigationFixer.cs +++ b/src/EFCore/ChangeTracking/Internal/INavigationFixer.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface INavigationFixer { /// diff --git a/src/EFCore/ChangeTracking/Internal/IStateManager.cs b/src/EFCore/ChangeTracking/Internal/IStateManager.cs index 4259fcd670f..6155933be40 100644 --- a/src/EFCore/ChangeTracking/Internal/IStateManager.cs +++ b/src/EFCore/ChangeTracking/Internal/IStateManager.cs @@ -17,19 +17,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IStateManager : IResettableService { /// diff --git a/src/EFCore/ChangeTracking/Internal/IValueGenerationManager.cs b/src/EFCore/ChangeTracking/Internal/IValueGenerationManager.cs index 6291a5f5408..c3539dbcd89 100644 --- a/src/EFCore/ChangeTracking/Internal/IValueGenerationManager.cs +++ b/src/EFCore/ChangeTracking/Internal/IValueGenerationManager.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IValueGenerationManager { /// diff --git a/src/EFCore/ChangeTracking/Internal/InternalEntityEntryNotifier.cs b/src/EFCore/ChangeTracking/Internal/InternalEntityEntryNotifier.cs index 263f3fa92cb..57e364a15ef 100644 --- a/src/EFCore/ChangeTracking/Internal/InternalEntityEntryNotifier.cs +++ b/src/EFCore/ChangeTracking/Internal/InternalEntityEntryNotifier.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class InternalEntityEntryNotifier : IInternalEntityEntryNotifier { private readonly ILocalViewListener _localViewListener; diff --git a/src/EFCore/ChangeTracking/Internal/InternalEntityEntrySubscriber.cs b/src/EFCore/ChangeTracking/Internal/InternalEntityEntrySubscriber.cs index 40eda0e702f..b3a2079dc02 100644 --- a/src/EFCore/ChangeTracking/Internal/InternalEntityEntrySubscriber.cs +++ b/src/EFCore/ChangeTracking/Internal/InternalEntityEntrySubscriber.cs @@ -14,18 +14,16 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class InternalEntityEntrySubscriber : IInternalEntityEntrySubscriber { /// diff --git a/src/EFCore/ChangeTracking/Internal/KeyPropagator.cs b/src/EFCore/ChangeTracking/Internal/KeyPropagator.cs index 67414c2d9b9..76832132908 100644 --- a/src/EFCore/ChangeTracking/Internal/KeyPropagator.cs +++ b/src/EFCore/ChangeTracking/Internal/KeyPropagator.cs @@ -13,19 +13,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class KeyPropagator : IKeyPropagator { private readonly IValueGeneratorSelector _valueGeneratorSelector; diff --git a/src/EFCore/ChangeTracking/Internal/LocalViewListener.cs b/src/EFCore/ChangeTracking/Internal/LocalViewListener.cs index 1295f3de34b..cb0f099a7c9 100644 --- a/src/EFCore/ChangeTracking/Internal/LocalViewListener.cs +++ b/src/EFCore/ChangeTracking/Internal/LocalViewListener.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class LocalViewListener : ILocalViewListener { private readonly IList> _viewActions diff --git a/src/EFCore/ChangeTracking/Internal/NavigationFixer.cs b/src/EFCore/ChangeTracking/Internal/NavigationFixer.cs index 37271183dd1..64fa0a77bf5 100644 --- a/src/EFCore/ChangeTracking/Internal/NavigationFixer.cs +++ b/src/EFCore/ChangeTracking/Internal/NavigationFixer.cs @@ -14,19 +14,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class NavigationFixer : INavigationFixer { private IList? _danglingJoinEntities; diff --git a/src/EFCore/ChangeTracking/Internal/StateManager.cs b/src/EFCore/ChangeTracking/Internal/StateManager.cs index d917b18555f..d7e92dd356d 100644 --- a/src/EFCore/ChangeTracking/Internal/StateManager.cs +++ b/src/EFCore/ChangeTracking/Internal/StateManager.cs @@ -21,19 +21,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { // This is lower-level change tracking services used by the ChangeTracker and other parts of the system /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class StateManager : IStateManager { private readonly EntityReferenceMap _entityReferenceMap = new(hasSubMap: true); diff --git a/src/EFCore/ChangeTracking/Internal/StateManagerDependencies.cs b/src/EFCore/ChangeTracking/Internal/StateManagerDependencies.cs index a3265e6d9b1..e27855b1929 100644 --- a/src/EFCore/ChangeTracking/Internal/StateManagerDependencies.cs +++ b/src/EFCore/ChangeTracking/Internal/StateManagerDependencies.cs @@ -20,6 +20,8 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal /// 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 @@ -34,34 +36,23 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record StateManagerDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// 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. - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public StateManagerDependencies( IInternalEntityEntrySubscriber internalEntityEntrySubscriber, diff --git a/src/EFCore/ChangeTracking/Internal/ValueGenerationManager.cs b/src/EFCore/ChangeTracking/Internal/ValueGenerationManager.cs index 9b9bc39ed44..01edc381e9f 100644 --- a/src/EFCore/ChangeTracking/Internal/ValueGenerationManager.cs +++ b/src/EFCore/ChangeTracking/Internal/ValueGenerationManager.cs @@ -12,19 +12,17 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class ValueGenerationManager : IValueGenerationManager { private readonly IValueGeneratorSelector _valueGeneratorSelector; diff --git a/src/EFCore/ChangeTracking/LocalView.cs b/src/EFCore/ChangeTracking/LocalView.cs index eb223a4eeb9..5bca1af5e68 100644 --- a/src/EFCore/ChangeTracking/LocalView.cs +++ b/src/EFCore/ChangeTracking/LocalView.cs @@ -17,11 +17,11 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// A collection that stays in sync with entities of a given type being tracked by - /// a . Call to obtain a - /// local view. - /// + /// A collection that stays in sync with entities of a given type being tracked by + /// a . Call to obtain a + /// local view. + /// + /// /// /// This local view will stay in sync as entities are added or removed from the context. Likewise, entities /// added to or removed from the local view will automatically be added to or removed @@ -45,9 +45,9 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking /// Do not use this type directly for data binding. Instead call /// for WPF binding, or for WinForms. /// - /// - /// - /// See Local views of tracked entities in EF Core for more information. + /// + /// See Local views of tracked entities in EF Core for more information. + /// /// /// The type of the entity in the local view. public class LocalView : @@ -192,17 +192,17 @@ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); /// - /// - /// Adds a new entity to the . If the entity is not being tracked or is currently - /// marked as deleted, then it becomes tracked as . - /// + /// Adds a new entity to the . If the entity is not being tracked or is currently + /// marked as deleted, then it becomes tracked as . + /// + /// /// /// Note that only the given entity is tracked. Any related entities discoverable from /// the given entity are not automatically tracked. /// - /// - /// - /// See Local views of tracked entities in EF Core for more information. + /// + /// See Local views of tracked entities in EF Core for more information. + /// /// /// The item to start tracking. public virtual void Add(TEntity item) @@ -237,22 +237,19 @@ public virtual void Add(TEntity item) } /// - /// - /// Marks all entities of type TEntity being tracked by the - /// as . - /// + /// Marks all entities of type TEntity being tracked by the + /// as . + /// + /// /// /// Entities that are currently marked as will be marked /// as since the Added state indicates that the entity /// has not been saved to the database and hence it does not make sense to attempt to /// delete it from the database. /// - /// - /// - /// See Local views of tracked entities in EF Core for more information. - /// - /// - /// See Local views of tracked entities in EF Core for more information. + /// + /// See Local views of tracked entities in EF Core for more information. + /// /// public virtual void Clear() { @@ -296,18 +293,18 @@ public virtual void CopyTo(TEntity[] array, int arrayIndex) } /// - /// - /// Marks the given entity as . - /// + /// Marks the given entity as . + /// + /// /// /// Entities that are currently marked as will be marked /// as since the Added state indicates that the entity /// has not been saved to the database and hence it does not make sense to attempt to /// delete it from the database. /// - /// - /// - /// See Local views of tracked entities in EF Core for more information. + /// + /// See Local views of tracked entities in EF Core for more information. + /// /// /// The entity to delete. /// if the entity was being tracked and was not already Deleted. @@ -473,16 +470,14 @@ public virtual BindingList ToBindingList() => _bindingList ??= new ObservableBackedBindingList(ToObservableCollection()); /// - /// - /// This method is called by data binding frameworks when attempting to data bind - /// directly to a . - /// - /// - /// This implementation always throws an exception as - /// does not maintain an ordered list with indexes. Instead call - /// for WPF binding, or for WinForms. - /// + /// This method is called by data binding frameworks when attempting to data bind + /// directly to a . /// + /// + /// This implementation always throws an exception as + /// does not maintain an ordered list with indexes. Instead call + /// for WPF binding, or for WinForms. + /// /// Always thrown. /// Never returns, always throws an exception. IList IListSource.GetList() diff --git a/src/EFCore/ChangeTracking/MemberEntry.cs b/src/EFCore/ChangeTracking/MemberEntry.cs index 47b257537d4..dfa61b893d1 100644 --- a/src/EFCore/ChangeTracking/MemberEntry.cs +++ b/src/EFCore/ChangeTracking/MemberEntry.cs @@ -10,10 +10,10 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Provides access to change tracking information and operations for a given property - /// or navigation property. - /// + /// Provides access to change tracking information and operations for a given property + /// or navigation property. + /// + /// /// /// Scalar properties use the derived class , reference navigation /// properties use the derived class , and collection navigation @@ -23,9 +23,9 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking /// Instances of this class are returned from methods when using the API and it is /// not designed to be directly constructed in your application code. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// public abstract class MemberEntry : IInfrastructure { @@ -55,20 +55,20 @@ protected MemberEntry(InternalEntityEntry internalEntry, IPropertyBase metadata) protected virtual InternalEntityEntry InternalEntry { get; } /// - /// - /// For non-navigation properties, gets or sets a value indicating whether the value of this - /// property has been modified and should be updated in the database when - /// - /// is called. - /// + /// For non-navigation properties, gets or sets a value indicating whether the value of this + /// property has been modified and should be updated in the database when + /// + /// is called. + /// + /// /// /// For navigation properties, gets or sets a value indicating whether any of foreign key /// property values associated with this navigation property have been modified and should /// be updated in the database when is called. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// public abstract bool IsModified { get; set; } diff --git a/src/EFCore/ChangeTracking/NavigationEntry.cs b/src/EFCore/ChangeTracking/NavigationEntry.cs index d5844420280..3e364d9b570 100644 --- a/src/EFCore/ChangeTracking/NavigationEntry.cs +++ b/src/EFCore/ChangeTracking/NavigationEntry.cs @@ -14,18 +14,18 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Provides access to change tracking and loading information for a navigation property - /// that associates this entity to one or more other entities. - /// + /// Provides access to change tracking and loading information for a navigation property + /// that associates this entity to one or more other entities. + /// + /// /// /// Instances of this class are returned from methods when using the API and it is /// not designed to be directly constructed in your application code. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// public abstract class NavigationEntry : MemberEntry { @@ -94,25 +94,25 @@ private static INavigationBase GetNavigation(InternalEntityEntry internalEntry, } /// + /// Loads the entity or entities referenced by this navigation property, unless + /// is already set to true. + /// + /// /// - /// Loads the entity or entities referenced by this navigation property, unless - /// is already set to true. + /// Note that entities that are already being tracked are not overwritten with new data from the database. /// /// - /// Note that entities that are already being tracked are not overwritten with new data from the database. + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. /// public abstract void Load(); /// - /// - /// Loads the entity or entities referenced by this navigation property, unless - /// is already set to true. - /// + /// Loads the entity or entities referenced by this navigation property, unless + /// is already set to true. + /// + /// /// /// Note that entities that are already being tracked are not overwritten with new data from the database. /// @@ -120,10 +120,10 @@ private static INavigationBase GetNavigation(InternalEntityEntry internalEntry, /// Multiple active operations on the same context instance are not supported. Use to ensure /// that any asynchronous operations have completed before calling another method on this context. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// /// A to observe while waiting for the task to complete. /// A task that represents the asynchronous operation. @@ -131,27 +131,27 @@ private static INavigationBase GetNavigation(InternalEntityEntry internalEntry, public abstract Task LoadAsync(CancellationToken cancellationToken = default); /// - /// - /// Returns the query that would be used by to load entities referenced by - /// this navigation property. - /// + /// Returns the query that would be used by to load entities referenced by + /// this navigation property. + /// + /// /// /// The query can be composed over using LINQ to perform filtering, counting, etc. without /// actually loading all entities from the database. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// /// The query to load related entities. public abstract IQueryable Query(); /// - /// - /// Gets or sets a value indicating whether the entity or entities referenced by this navigation property - /// are known to be loaded. - /// + /// Gets or sets a value indicating whether the entity or entities referenced by this navigation property + /// are known to be loaded. + /// + /// /// /// Loading entities from the database using /// or @@ -166,10 +166,10 @@ private static INavigationBase GetNavigation(InternalEntityEntry internalEntry, /// have been loaded. In such cases, calling or will ensure all /// related entities are loaded and will set this flag to true. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// /// /// if all the related entities are loaded or the IsLoaded has been explicitly set to true. diff --git a/src/EFCore/ChangeTracking/PropertyEntry.cs b/src/EFCore/ChangeTracking/PropertyEntry.cs index 2691cf7dccf..dbaf85a5694 100644 --- a/src/EFCore/ChangeTracking/PropertyEntry.cs +++ b/src/EFCore/ChangeTracking/PropertyEntry.cs @@ -8,16 +8,16 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Provides access to change tracking information and operations for a given property. - /// + /// Provides access to change tracking information and operations for a given property. + /// + /// /// /// Instances of this class are returned from methods when using the API and it is /// not designed to be directly constructed in your application code. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// public class PropertyEntry : MemberEntry { diff --git a/src/EFCore/ChangeTracking/PropertyEntry`.cs b/src/EFCore/ChangeTracking/PropertyEntry`.cs index 73b75d89e32..7f58e0bfd62 100644 --- a/src/EFCore/ChangeTracking/PropertyEntry`.cs +++ b/src/EFCore/ChangeTracking/PropertyEntry`.cs @@ -8,16 +8,16 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Provides access to change tracking information and operations for a given property. - /// + /// Provides access to change tracking information and operations for a given property. + /// + /// /// /// Instances of this class are returned from methods when using the API and it is /// not designed to be directly constructed in your application code. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// /// The type of the entity the property belongs to. /// The type of the property. diff --git a/src/EFCore/ChangeTracking/PropertyValues.cs b/src/EFCore/ChangeTracking/PropertyValues.cs index a50f5a65ba8..56160db45e6 100644 --- a/src/EFCore/ChangeTracking/PropertyValues.cs +++ b/src/EFCore/ChangeTracking/PropertyValues.cs @@ -13,9 +13,9 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// A collection of all property values for an entity. - /// + /// A collection of all property values for an entity. + /// + /// /// /// Objects of this type can be obtained from , /// , , @@ -23,9 +23,9 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking /// Once obtained, the objects are usually used in various combinations to resolve optimistic /// concurrency exceptions signaled by the throwing of a . /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// public abstract class PropertyValues { @@ -61,18 +61,18 @@ protected PropertyValues(InternalEntityEntry internalEntry) public abstract object ToObject(); /// - /// - /// Sets the values of this object by copying values from the given object. - /// + /// Sets the values of this object by copying values from the given object. + /// + /// /// /// The given object can be of any type. Any property on the object with a name that /// matches a property name in the entity type and can be read will be copied. Other /// properties will be ignored. This allows, for example, copying of properties from /// simple Data Transfer Objects (DTOs). /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// /// The object to read values from. public abstract void SetValues(object obj); @@ -88,32 +88,32 @@ protected PropertyValues(InternalEntityEntry internalEntry) public abstract PropertyValues Clone(); /// - /// - /// Sets the values of this object by reading values from another - /// object. - /// + /// Sets the values of this object by reading values from another + /// object. + /// + /// /// /// The other object must be based on the same type as this object, or a type derived /// from the type for this object. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// /// The object from which values should be copied. public abstract void SetValues(PropertyValues propertyValues); /// - /// - /// Sets the values of this object by copying values from the given dictionary. - /// + /// Sets the values of this object by copying values from the given dictionary. + /// + /// /// /// The keys of the dictionary must match property names. Any key in the dictionary /// that does not match the name of a property in the entity type will be ignored. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// /// The dictionary to read values from. public virtual void SetValues(IDictionary values) diff --git a/src/EFCore/ChangeTracking/ReferenceEntry.cs b/src/EFCore/ChangeTracking/ReferenceEntry.cs index 69329e0b9c5..a5d1e00284f 100644 --- a/src/EFCore/ChangeTracking/ReferenceEntry.cs +++ b/src/EFCore/ChangeTracking/ReferenceEntry.cs @@ -15,18 +15,18 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Provides access to change tracking and loading information for a reference (i.e. non-collection) - /// navigation property that associates this entity to another entity. - /// + /// Provides access to change tracking and loading information for a reference (i.e. non-collection) + /// navigation property that associates this entity to another entity. + /// + /// /// /// Instances of this class are returned from methods when using the API and it is /// not designed to be directly constructed in your application code. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// public class ReferenceEntry : NavigationEntry { @@ -83,17 +83,17 @@ private void LocalDetectChanges() } /// + /// Loads the entity or entities referenced by this navigation property, unless + /// is already set to true. + /// + /// /// - /// Loads the entity or entities referenced by this navigation property, unless - /// is already set to true. + /// Note that entities that are already being tracked are not overwritten with new data from the database. /// /// - /// Note that entities that are already being tracked are not overwritten with new data from the database. + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. /// public override void Load() { @@ -104,10 +104,10 @@ public override void Load() } /// - /// - /// Loads the entity or entities referenced by this navigation property, unless - /// is already set to true. - /// + /// Loads the entity or entities referenced by this navigation property, unless + /// is already set to true. + /// + /// /// /// Note that entities that are already being tracked are not overwritten with new data from the database. /// @@ -115,10 +115,10 @@ public override void Load() /// Multiple active operations on the same context instance are not supported. Use to ensure /// that any asynchronous operations have completed before calling another method on this context. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// /// A to observe while waiting for the task to complete. /// A task that represents the asynchronous operation. @@ -129,18 +129,18 @@ public override Task LoadAsync(CancellationToken cancellationToken = default) : TargetFinder.LoadAsync((INavigation)Metadata, InternalEntry, cancellationToken); /// - /// - /// Returns the query that would be used by to load entities referenced by - /// this navigation property. - /// + /// Returns the query that would be used by to load entities referenced by + /// this navigation property. + /// + /// /// /// The query can be composed over using LINQ to perform filtering, counting, etc. without /// actually loading all entities from the database. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// /// The query to load related entities. public override IQueryable Query() diff --git a/src/EFCore/ChangeTracking/ReferenceEntry`.cs b/src/EFCore/ChangeTracking/ReferenceEntry`.cs index c219a6e2f99..c99b340c6ff 100644 --- a/src/EFCore/ChangeTracking/ReferenceEntry`.cs +++ b/src/EFCore/ChangeTracking/ReferenceEntry`.cs @@ -9,18 +9,18 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Provides access to change tracking and loading information for a reference (i.e. non-collection) - /// navigation property that associates this entity to another entity. - /// + /// Provides access to change tracking and loading information for a reference (i.e. non-collection) + /// navigation property that associates this entity to another entity. + /// + /// /// /// Instances of this class are returned from methods when using the API and it is /// not designed to be directly constructed in your application code. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// /// The type of the entity the property belongs to. /// The type of the property. @@ -95,18 +95,18 @@ public ReferenceEntry(InternalEntityEntry internalEntry, INavigation navigation) } /// - /// - /// Returns the query that would be used by to load the entity referenced by - /// this navigation property. - /// + /// Returns the query that would be used by to load the entity referenced by + /// this navigation property. + /// + /// /// /// The query can be composed over using LINQ to perform filtering, counting, etc. without /// actually loading the entity from the database. /// - /// - /// - /// See Accessing tracked entities in EF Core - /// and Loading related entities for more information. + /// + /// See Accessing tracked entities in EF Core + /// and Loading related entities for more information. + /// /// public new virtual IQueryable Query() => (IQueryable)base.Query(); diff --git a/src/EFCore/ChangeTracking/ValueComparer.cs b/src/EFCore/ChangeTracking/ValueComparer.cs index b09ccf00a97..442d339ca33 100644 --- a/src/EFCore/ChangeTracking/ValueComparer.cs +++ b/src/EFCore/ChangeTracking/ValueComparer.cs @@ -13,21 +13,21 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Specifies custom value snapshotting and comparison for - /// CLR types that cannot be compared with - /// and/or need a deep/structural copy when taking a snapshot. For example, arrays of primitive types - /// will require both if mutation is to be detected. - /// + /// Specifies custom value snapshotting and comparison for + /// CLR types that cannot be compared with + /// and/or need a deep/structural copy when taking a snapshot. For example, arrays of primitive types + /// will require both if mutation is to be detected. + /// + /// /// /// Snapshotting is the process of creating a copy of the value into a snapshot so it can /// later be compared to determine if it has changed. For some types, such as collections, /// this needs to be a deep copy of the collection rather than just a shallow copy of the /// reference. /// - /// - /// - /// See EF Core value comparers for more information. + /// + /// See EF Core value comparers for more information. + /// /// public abstract class ValueComparer : IEqualityComparer, IEqualityComparer { @@ -94,16 +94,14 @@ protected ValueComparer( public abstract int GetHashCode(object instance); /// - /// - /// Creates a snapshot of the given instance. - /// - /// - /// Snapshotting is the process of creating a copy of the value into a snapshot so it can - /// later be compared to determine if it has changed. For some types, such as collections, - /// this needs to be a deep copy of the collection rather than just a shallow copy of the - /// reference. - /// + /// Creates a snapshot of the given instance. /// + /// + /// Snapshotting is the process of creating a copy of the value into a snapshot so it can + /// later be compared to determine if it has changed. For some types, such as collections, + /// this needs to be a deep copy of the collection rather than just a shallow copy of the + /// reference. + /// /// The instance. /// The snapshot. [return: NotNullIfNotNull("instance")] @@ -120,16 +118,14 @@ protected ValueComparer( public virtual LambdaExpression HashCodeExpression { get; } /// - /// - /// The snapshot expression. - /// - /// - /// Snapshotting is the process of creating a copy of the value into a snapshot so it can - /// later be compared to determine if it has changed. For some types, such as collections, - /// this needs to be a deep copy of the collection rather than just a shallow copy of the - /// reference. - /// + /// The snapshot expression. /// + /// + /// Snapshotting is the process of creating a copy of the value into a snapshot so it can + /// later be compared to determine if it has changed. For some types, such as collections, + /// this needs to be a deep copy of the collection rather than just a shallow copy of the + /// reference. + /// public virtual LambdaExpression SnapshotExpression { get; } /// diff --git a/src/EFCore/ChangeTracking/ValueComparer`.cs b/src/EFCore/ChangeTracking/ValueComparer`.cs index 6a109533fb9..f7eeb0458b6 100644 --- a/src/EFCore/ChangeTracking/ValueComparer`.cs +++ b/src/EFCore/ChangeTracking/ValueComparer`.cs @@ -12,21 +12,21 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking { /// - /// - /// Specifies custom value snapshotting and comparison for - /// CLR types that cannot be compared with - /// and/or need a deep copy when taking a snapshot. For example, arrays of primitive types - /// will require both if mutation is to be detected. - /// + /// Specifies custom value snapshotting and comparison for + /// CLR types that cannot be compared with + /// and/or need a deep copy when taking a snapshot. For example, arrays of primitive types + /// will require both if mutation is to be detected. + /// + /// /// /// Snapshotting is the process of creating a copy of the value into a snapshot so it can /// later be compared to determine if it has changed. For some types, such as collections, /// this needs to be a deep copy of the collection rather than just a shallow copy of the /// reference. /// - /// - /// - /// See EF Core value comparers for more information. + /// + /// See EF Core value comparers for more information. + /// /// /// The type. public class ValueComparer : ValueComparer, IEqualityComparer @@ -65,17 +65,15 @@ public ValueComparer( } /// - /// - /// Creates a new with the given comparison and - /// snapshotting expressions. - /// - /// - /// Snapshotting is the process of creating a copy of the value into a snapshot so it can - /// later be compared to determine if it has changed. For some types, such as collections, - /// this needs to be a deep copy of the collection rather than just a shallow copy of the - /// reference. - /// + /// Creates a new with the given comparison and + /// snapshotting expressions. /// + /// + /// Snapshotting is the process of creating a copy of the value into a snapshot so it can + /// later be compared to determine if it has changed. For some types, such as collections, + /// this needs to be a deep copy of the collection rather than just a shallow copy of the + /// reference. + /// /// The comparison expression. /// The associated hash code generator. /// The snapshot expression. @@ -295,32 +293,28 @@ public virtual int GetHashCode(T instance) ref _hashCode, this, static c => c.HashCodeExpression.Compile())(instance); /// - /// - /// Creates a snapshot of the given instance. - /// - /// - /// Snapshotting is the process of creating a copy of the value into a snapshot so it can - /// later be compared to determine if it has changed. For some types, such as collections, - /// this needs to be a deep copy of the collection rather than just a shallow copy of the - /// reference. - /// + /// Creates a snapshot of the given instance. /// + /// + /// Snapshotting is the process of creating a copy of the value into a snapshot so it can + /// later be compared to determine if it has changed. For some types, such as collections, + /// this needs to be a deep copy of the collection rather than just a shallow copy of the + /// reference. + /// /// The instance. /// The snapshot. public override object? Snapshot(object? instance) => instance == null ? null : Snapshot((T)instance); /// - /// - /// Creates a snapshot of the given instance. - /// - /// - /// Snapshotting is the process of creating a copy of the value into a snapshot so it can - /// later be compared to determine if it has changed. For some types, such as collections, - /// this needs to be a deep copy of the collection rather than just a shallow copy of the - /// reference. - /// + /// Creates a snapshot of the given instance. /// + /// + /// Snapshotting is the process of creating a copy of the value into a snapshot so it can + /// later be compared to determine if it has changed. For some types, such as collections, + /// this needs to be a deep copy of the collection rather than just a shallow copy of the + /// reference. + /// /// The instance. /// The snapshot. public virtual T Snapshot(T instance) @@ -346,16 +340,14 @@ public override Type Type => (Expression>)base.HashCodeExpression; /// - /// - /// The snapshot expression. - /// - /// - /// Snapshotting is the process of creating a copy of the value into a snapshot so it can - /// later be compared to determine if it has changed. For some types, such as collections, - /// this needs to be a deep copy of the collection rather than just a shallow copy of the - /// reference. - /// + /// The snapshot expression. /// + /// + /// Snapshotting is the process of creating a copy of the value into a snapshot so it can + /// later be compared to determine if it has changed. For some types, such as collections, + /// this needs to be a deep copy of the collection rather than just a shallow copy of the + /// reference. + /// public new virtual Expression> SnapshotExpression => (Expression>)base.SnapshotExpression; } diff --git a/src/EFCore/ChangeTrackingStrategy.cs b/src/EFCore/ChangeTrackingStrategy.cs index 3544fca6467..4671b5081e8 100644 --- a/src/EFCore/ChangeTrackingStrategy.cs +++ b/src/EFCore/ChangeTrackingStrategy.cs @@ -30,30 +30,26 @@ public enum ChangeTrackingStrategy ChangedNotifications, /// - /// - /// To use this strategy, the entity class must implement and - /// . - /// Original values are recorded when the entity raises the event. - /// Properties are marked as modified when the entity raises the event. - /// - /// - /// Original values are only recorded when they are required to save changes to the entity. For example, properties that are - /// configured as concurrency tokens. - /// + /// To use this strategy, the entity class must implement and + /// . + /// Original values are recorded when the entity raises the event. + /// Properties are marked as modified when the entity raises the event. /// + /// + /// Original values are only recorded when they are required to save changes to the entity. For example, properties that are + /// configured as concurrency tokens. + /// ChangingAndChangedNotifications, /// - /// - /// To use this strategy, the entity class must implement and - /// . - /// Original values are recorded when the entity raises the . - /// Properties are marked as modified when the entity raises the event. - /// - /// - /// Original values are recorded for all properties, regardless of whether they are required to save changes to the entity. - /// + /// To use this strategy, the entity class must implement and + /// . + /// Original values are recorded when the entity raises the . + /// Properties are marked as modified when the entity raises the event. /// + /// + /// Original values are recorded for all properties, regardless of whether they are required to save changes to the entity. + /// ChangingAndChangedNotificationsWithOriginalValues } } diff --git a/src/EFCore/DbContext.cs b/src/EFCore/DbContext.cs index 32b9dd4ead6..4ab368b9cbe 100644 --- a/src/EFCore/DbContext.cs +++ b/src/EFCore/DbContext.cs @@ -24,18 +24,16 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// A DbContext instance represents a session with the database and can be used to query and save - /// instances of your entities. DbContext is a combination of the Unit Of Work and Repository patterns. - /// + /// A DbContext instance represents a session with the database and can be used to query and save + /// instances of your entities. DbContext is a combination of the Unit Of Work and Repository patterns. + /// + /// /// /// Entity Framework Core does not support multiple parallel operations being run on the same DbContext instance. This /// includes both parallel execution of async queries and any explicit concurrent use from multiple threads. /// Therefore, always await async calls immediately, or use separate DbContext instances for operations that execute /// in parallel. See Avoiding DbContext threading issues for more information. /// - /// - /// /// /// Typically you create a class that derives from DbContext and contains /// properties for each entity in the model. If the properties have a public setter, @@ -85,11 +83,9 @@ public class DbContext : private int _leaseCount; /// - /// - /// Initializes a new instance of the class. The - /// - /// method will be called to configure the database (and other options) to be used for this context. - /// + /// Initializes a new instance of the class. The + /// + /// method will be called to configure the database (and other options) to be used for this context. /// /// /// See DbContext lifetime, configuration, and initialization @@ -101,11 +97,9 @@ protected DbContext() } /// - /// - /// Initializes a new instance of the class using the specified options. - /// The method will still be called to allow further - /// configuration of the options. - /// + /// Initializes a new instance of the class using the specified options. + /// The method will still be called to allow further + /// configuration of the options. /// /// /// See DbContext lifetime, configuration, and initialization and @@ -174,14 +168,12 @@ public virtual IModel Model } /// - /// - /// A unique identifier for the context instance and pool lease, if any. - /// - /// - /// This identifier is primarily intended as a correlation ID for logging and debugging such - /// that it is easy to identify that multiple events are using the same or different context instances. - /// + /// A unique identifier for the context instance and pool lease, if any. /// + /// + /// This identifier is primarily intended as a correlation ID for logging and debugging such + /// that it is easy to identify that multiple events are using the same or different context instances. + /// public virtual DbContextId ContextId => new(_contextId, _leaseCount); @@ -312,19 +304,19 @@ object IDbSetCache.GetOrAddSet(IDbSetSource source, string entityTypeName, Type } /// - /// - /// Creates a that can be used to query and save instances of . - /// + /// Creates a that can be used to query and save instances of . + /// + /// /// /// Entity Framework Core does not support multiple parallel operations being run on the same DbContext instance. This /// includes both parallel execution of async queries and any explicit concurrent use from multiple threads. /// Therefore, always await async calls immediately, or use separate DbContext instances for operations that execute /// in parallel. See Avoiding DbContext threading issues for more information. /// - /// - /// - /// See Querying data with EF Core and - /// Changing tracking for more information. + /// + /// See Querying data with EF Core and + /// Changing tracking for more information. + /// /// /// The type of entity for which a set should be returned. /// A set for the given entity type. @@ -333,18 +325,18 @@ public virtual DbSet Set() => (DbSet)((IDbSetCache)this).GetOrAddSet(DbContextDependencies.SetSource, typeof(TEntity)); /// + /// Creates a for a shared-type entity type that can be used to query and save + /// instances of . + /// + /// /// - /// Creates a for a shared-type entity type that can be used to query and save - /// instances of . + /// Shared-type entity types are typically used for the join entity in many-to-many relationships. /// /// - /// Shared-type entity types are typically used for the join entity in many-to-many relationships. + /// See Querying data with EF Core, + /// Changing tracking, and + /// Shared entity types for more information. /// - /// - /// - /// See Querying data with EF Core, - /// Changing tracking, and - /// Shared entity types for more information. /// /// The name for the shared-type entity type to use. /// The type of entity for which a set should be returned. @@ -461,21 +453,21 @@ private void CheckDisposed() } /// - /// - /// Override this method to configure the database (and other options) to be used for this context. - /// This method is called for each instance of the context that is created. - /// The base implementation does nothing. - /// + /// Override this method to configure the database (and other options) to be used for this context. + /// This method is called for each instance of the context that is created. + /// The base implementation does nothing. + /// + /// /// /// In situations where an instance of may or may not have been passed /// to the constructor, you can use to determine if /// the options have already been set, and skip some or all of the logic in /// . /// - /// - /// - /// See DbContext lifetime, configuration, and initialization - /// for more information. + /// + /// See DbContext lifetime, configuration, and initialization + /// for more information. + /// /// /// /// A builder used to create or modify options for this context. Databases (and other extensions) @@ -490,11 +482,13 @@ protected internal virtual void OnConfiguring(DbContextOptionsBuilder optionsBui /// . /// /// - /// If a model is explicitly set on the options for this context (via ) - /// then this method will not be run. - /// - /// - /// See Pre-convention model building in EF Core for more information. + /// + /// If a model is explicitly set on the options for this context (via ) + /// then this method will not be run. + /// + /// + /// See Pre-convention model building in EF Core for more information. + /// /// /// /// The builder being used to set defaults and configure conventions that will be used to build the model for this context. @@ -527,9 +521,9 @@ protected internal virtual void OnModelCreating(ModelBuilder modelBuilder) } /// - /// - /// Saves all changes made in this context to the database. - /// + /// Saves all changes made in this context to the database. + /// + /// /// /// This method will automatically call to discover any /// changes to entity instances before saving to the underlying database. This can be disabled via @@ -541,9 +535,9 @@ protected internal virtual void OnModelCreating(ModelBuilder modelBuilder) /// Therefore, always await async calls immediately, or use separate DbContext instances for operations that execute /// in parallel. See Avoiding DbContext threading issues for more information. /// - /// - /// - /// See Saving data in EF Core for more information. + /// + /// See Saving data in EF Core for more information. + /// /// /// /// The number of state entries written to the database. @@ -560,9 +554,9 @@ public virtual int SaveChanges() => SaveChanges(acceptAllChangesOnSuccess: true); /// - /// - /// Saves all changes made in this context to the database. - /// + /// Saves all changes made in this context to the database. + /// + /// /// /// This method will automatically call to discover any /// changes to entity instances before saving to the underlying database. This can be disabled via @@ -574,9 +568,9 @@ public virtual int SaveChanges() /// Therefore, always await async calls immediately, or use separate DbContext instances for operations that execute /// in parallel. See Avoiding DbContext threading issues for more information. /// - /// - /// - /// See Saving data in EF Core for more information. + /// + /// See Saving data in EF Core for more information. + /// /// /// /// Indicates whether is called after the changes have @@ -652,9 +646,9 @@ private void TryDetectChanges(EntityEntry entry) } /// - /// - /// Saves all changes made in this context to the database. - /// + /// Saves all changes made in this context to the database. + /// + /// /// /// This method will automatically call to discover any /// changes to entity instances before saving to the underlying database. This can be disabled via @@ -666,9 +660,9 @@ private void TryDetectChanges(EntityEntry entry) /// Therefore, always await async calls immediately, or use separate DbContext instances for operations that execute /// in parallel. See Avoiding DbContext threading issues for more information. /// - /// - /// - /// See Saving data in EF Core for more information. + /// + /// See Saving data in EF Core for more information. + /// /// /// A to observe while waiting for the task to complete. /// @@ -688,9 +682,9 @@ public virtual Task SaveChangesAsync(CancellationToken cancellationToken = => SaveChangesAsync(acceptAllChangesOnSuccess: true, cancellationToken: cancellationToken); /// - /// - /// Saves all changes made in this context to the database. - /// + /// Saves all changes made in this context to the database. + /// + /// /// /// This method will automatically call to discover any /// changes to entity instances before saving to the underlying database. This can be disabled via @@ -702,9 +696,9 @@ public virtual Task SaveChangesAsync(CancellationToken cancellationToken = /// Therefore, always await async calls immediately, or use separate DbContext instances for operations that execute /// in parallel. See Avoiding DbContext threading issues for more information. /// - /// - /// - /// See Saving data in EF Core for more information. + /// + /// See Saving data in EF Core for more information. + /// /// /// /// Indicates whether is called after the changes have @@ -968,9 +962,9 @@ public virtual void Dispose() } /// - /// - /// Releases the allocated resources for this context. - /// + /// Releases the allocated resources for this context. + /// + /// /// /// Entity Framework Core does not support multiple parallel operations being run on the same DbContext instance. This /// includes both parallel execution of async queries and any explicit concurrent use from multiple threads. @@ -978,10 +972,10 @@ public virtual void Dispose() /// in parallel. See Avoiding DbContext threading issues /// for more information. /// - /// - /// - /// See DbContext lifetime, configuration, and initialization - /// for more information. + /// + /// See DbContext lifetime, configuration, and initialization + /// for more information. + /// /// public virtual async ValueTask DisposeAsync() { @@ -1059,18 +1053,18 @@ private EntityEntry EntryWithoutDetectChanges(TEntity entity) => new(DbContextDependencies.StateManager.GetOrCreateEntry(entity)); /// - /// - /// Gets an for the given entity. The entry provides - /// access to change tracking information and operations for the entity. - /// + /// Gets an for the given entity. The entry provides + /// access to change tracking information and operations for the entity. + /// + /// /// /// This method may be called on an entity that is not tracked. You can then /// set the property on the returned entry /// to have the context begin tracking the entity in the specified state. /// - /// - /// - /// See Accessing tracked entities in EF Core for more information. + /// + /// See Accessing tracked entities in EF Core for more information. + /// /// /// The entity to get the entry for. /// The entry for the given entity. @@ -1128,17 +1122,17 @@ private Task SetEntityStateAsync( } /// + /// Begins tracking the given entity, and any other reachable entities that are + /// not already being tracked, in the state such that + /// they will be inserted into the database when is called. + /// + /// /// - /// Begins tracking the given entity, and any other reachable entities that are - /// not already being tracked, in the state such that - /// they will be inserted into the database when is called. + /// Use to set the state of only a single entity. /// /// - /// Use to set the state of only a single entity. + /// See EF Core change tracking for more information. /// - /// - /// - /// See EF Core change tracking for more information. /// /// The type of the entity. /// The entity to add. @@ -1155,11 +1149,11 @@ public virtual EntityEntry Add(TEntity entity) } /// - /// - /// Begins tracking the given entity, and any other reachable entities that are - /// not already being tracked, in the state such that they will - /// be inserted into the database when is called. - /// + /// Begins tracking the given entity, and any other reachable entities that are + /// not already being tracked, in the state such that they will + /// be inserted into the database when is called. + /// + /// /// /// This method is async only to allow special value generators, such as the one used by /// 'Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy.SequenceHiLo', @@ -1172,9 +1166,9 @@ public virtual EntityEntry Add(TEntity entity) /// in parallel. See Avoiding DbContext threading issues /// for more information. /// - /// - /// - /// See EF Core change tracking for more information. + /// + /// See EF Core change tracking for more information. + /// /// /// The type of the entity. /// The entity to add. @@ -1201,11 +1195,11 @@ await SetEntityStateAsync(entry.GetInfrastructure(), EntityState.Added, cancella } /// - /// - /// Begins tracking the given entity and entries reachable from the given entity using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entity and entries reachable from the given entity using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -1228,9 +1222,9 @@ await SetEntityStateAsync(entry.GetInfrastructure(), EntityState.Added, cancella /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking for more information. + /// + /// See EF Core change tracking for more information. + /// /// /// The type of the entity. /// The entity to attach. @@ -1247,11 +1241,11 @@ public virtual EntityEntry Attach(TEntity entity) } /// - /// - /// Begins tracking the given entity and entries reachable from the given entity using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entity and entries reachable from the given entity using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -1274,9 +1268,9 @@ public virtual EntityEntry Attach(TEntity entity) /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking for more information. + /// + /// See EF Core change tracking for more information. + /// /// /// The type of the entity. /// The entity to update. @@ -1357,17 +1351,17 @@ private EntityEntry SetEntityState( } /// + /// Begins tracking the given entity, and any other reachable entities that are + /// not already being tracked, in the state such that they will + /// be inserted into the database when is called. + /// + /// /// - /// Begins tracking the given entity, and any other reachable entities that are - /// not already being tracked, in the state such that they will - /// be inserted into the database when is called. + /// Use to set the state of only a single entity. /// /// - /// Use to set the state of only a single entity. + /// See EF Core change tracking for more information. /// - /// - /// - /// See EF Core change tracking for more information. /// /// The entity to add. /// @@ -1382,11 +1376,11 @@ public virtual EntityEntry Add(object entity) } /// - /// - /// Begins tracking the given entity, and any other reachable entities that are - /// not already being tracked, in the state such that they will - /// be inserted into the database when is called. - /// + /// Begins tracking the given entity, and any other reachable entities that are + /// not already being tracked, in the state such that they will + /// be inserted into the database when is called. + /// + /// /// /// Use to set the state of only a single entity. /// @@ -1402,9 +1396,9 @@ public virtual EntityEntry Add(object entity) /// in parallel. See Avoiding DbContext threading issues /// for more information. /// - /// - /// - /// See EF Core change tracking for more information. + /// + /// See EF Core change tracking for more information. + /// /// /// The entity to add. /// A to observe while waiting for the task to complete. @@ -1429,11 +1423,11 @@ await SetEntityStateAsync(entry.GetInfrastructure(), EntityState.Added, cancella } /// - /// - /// Begins tracking the given entity and entries reachable from the given entity using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entity and entries reachable from the given entity using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -1456,9 +1450,9 @@ await SetEntityStateAsync(entry.GetInfrastructure(), EntityState.Added, cancella /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking for more information. + /// + /// See EF Core change tracking for more information. + /// /// /// The entity to attach. /// @@ -1473,11 +1467,11 @@ public virtual EntityEntry Attach(object entity) } /// - /// - /// Begins tracking the given entity and entries reachable from the given entity using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entity and entries reachable from the given entity using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -1500,9 +1494,9 @@ public virtual EntityEntry Attach(object entity) /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking for more information. + /// + /// See EF Core change tracking for more information. + /// /// /// The entity to update. /// @@ -1594,11 +1588,11 @@ public virtual void AddRange(params object[] entities) } /// - /// - /// Begins tracking the given entity, and any other reachable entities that are - /// not already being tracked, in the state such that they will - /// be inserted into the database when is called. - /// + /// Begins tracking the given entity, and any other reachable entities that are + /// not already being tracked, in the state such that they will + /// be inserted into the database when is called. + /// + /// /// /// This method is async only to allow special value generators, such as the one used by /// 'Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy.SequenceHiLo', @@ -1611,11 +1605,11 @@ public virtual void AddRange(params object[] entities) /// in parallel. See Avoiding DbContext threading issues /// for more information. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to add. /// A task that represents the asynchronous operation. @@ -1627,11 +1621,11 @@ public virtual Task AddRangeAsync(params object[] entities) } /// - /// - /// Begins tracking the given entities and entries reachable from the given entities using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entities and entries reachable from the given entities using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -1654,11 +1648,11 @@ public virtual Task AddRangeAsync(params object[] entities) /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to attach. public virtual void AttachRange(params object[] entities) @@ -1669,11 +1663,11 @@ public virtual void AttachRange(params object[] entities) } /// - /// - /// Begins tracking the given entities and entries reachable from the given entities using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entities and entries reachable from the given entities using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -1696,11 +1690,11 @@ public virtual void AttachRange(params object[] entities) /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to update. public virtual void UpdateRange(params object[] entities) @@ -1725,11 +1719,11 @@ public virtual void UpdateRange(params object[] entities) /// they would be if was called before calling this method. /// This allows any cascading actions to be applied when is called. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to remove. public virtual void RemoveRange(params object[] entities) @@ -1768,11 +1762,11 @@ public virtual void AddRange(IEnumerable entities) } /// - /// - /// Begins tracking the given entity, and any other reachable entities that are - /// not already being tracked, in the state such that they will - /// be inserted into the database when is called. - /// + /// Begins tracking the given entity, and any other reachable entities that are + /// not already being tracked, in the state such that they will + /// be inserted into the database when is called. + /// + /// /// /// This method is async only to allow special value generators, such as the one used by /// 'Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy.SequenceHiLo', @@ -1785,11 +1779,11 @@ public virtual void AddRange(IEnumerable entities) /// in parallel. See Avoiding DbContext threading issues /// for more information. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to add. /// A to observe while waiting for the task to complete. @@ -1816,11 +1810,11 @@ await SetEntityStateAsync( } /// - /// - /// Begins tracking the given entities and entries reachable from the given entities using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entities and entries reachable from the given entities using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -1843,11 +1837,11 @@ await SetEntityStateAsync( /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to attach. public virtual void AttachRange(IEnumerable entities) @@ -1858,11 +1852,11 @@ public virtual void AttachRange(IEnumerable entities) } /// - /// - /// Begins tracking the given entities and entries reachable from the given entities using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entities and entries reachable from the given entities using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -1885,11 +1879,11 @@ public virtual void AttachRange(IEnumerable entities) /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to update. public virtual void UpdateRange(IEnumerable entities) @@ -1914,11 +1908,11 @@ public virtual void UpdateRange(IEnumerable entities) /// they would be if was called before calling this method. /// This allows any cascading actions to be applied when is called. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to remove. public virtual void RemoveRange(IEnumerable entities) @@ -1968,13 +1962,13 @@ public virtual void RemoveRange(IEnumerable entities) } /// - /// - /// Finds an entity with the given primary key values. If an entity with the given primary key values - /// is being tracked by the context, then it is returned immediately without making a request to the - /// database. Otherwise, a query is made to the database for an entity with the given primary key values - /// and this entity, if found, is attached to the context and returned. If no entity is found, then - /// null is returned. - /// + /// Finds an entity with the given primary key values. If an entity with the given primary key values + /// is being tracked by the context, then it is returned immediately without making a request to the + /// database. Otherwise, a query is made to the database for an entity with the given primary key values + /// and this entity, if found, is attached to the context and returned. If no entity is found, then + /// null is returned. + /// + /// /// /// Entity Framework Core does not support multiple parallel operations being run on the same DbContext instance. This /// includes both parallel execution of async queries and any explicit concurrent use from multiple threads. @@ -1982,9 +1976,9 @@ public virtual void RemoveRange(IEnumerable entities) /// in parallel. See Avoiding DbContext threading issues /// for more information. /// - /// - /// - /// See Using Find and FindAsync for more information. + /// + /// See Using Find and FindAsync for more information. + /// /// /// The type of entity to find. /// The values of the primary key for the entity to be found. @@ -1997,13 +1991,13 @@ public virtual void RemoveRange(IEnumerable entities) } /// - /// - /// Finds an entity with the given primary key values. If an entity with the given primary key values - /// is being tracked by the context, then it is returned immediately without making a request to the - /// database. Otherwise, a query is made to the database for an entity with the given primary key values - /// and this entity, if found, is attached to the context and returned. If no entity is found, then - /// null is returned. - /// + /// Finds an entity with the given primary key values. If an entity with the given primary key values + /// is being tracked by the context, then it is returned immediately without making a request to the + /// database. Otherwise, a query is made to the database for an entity with the given primary key values + /// and this entity, if found, is attached to the context and returned. If no entity is found, then + /// null is returned. + /// + /// /// /// Entity Framework Core does not support multiple parallel operations being run on the same DbContext instance. This /// includes both parallel execution of async queries and any explicit concurrent use from multiple threads. @@ -2011,9 +2005,9 @@ public virtual void RemoveRange(IEnumerable entities) /// in parallel. See Avoiding DbContext threading issues /// for more information. /// - /// - /// - /// See Using Find and FindAsync for more information. + /// + /// See Using Find and FindAsync for more information. + /// /// /// The type of entity to find. /// The values of the primary key for the entity to be found. @@ -2052,13 +2046,13 @@ public virtual void RemoveRange(IEnumerable entities) } /// - /// - /// Finds an entity with the given primary key values. If an entity with the given primary key values - /// is being tracked by the context, then it is returned immediately without making a request to the - /// database. Otherwise, a query is made to the database for an entity with the given primary key values - /// and this entity, if found, is attached to the context and returned. If no entity is found, then - /// null is returned. - /// + /// Finds an entity with the given primary key values. If an entity with the given primary key values + /// is being tracked by the context, then it is returned immediately without making a request to the + /// database. Otherwise, a query is made to the database for an entity with the given primary key values + /// and this entity, if found, is attached to the context and returned. If no entity is found, then + /// null is returned. + /// + /// /// /// Entity Framework Core does not support multiple parallel operations being run on the same DbContext instance. This /// includes both parallel execution of async queries and any explicit concurrent use from multiple threads. @@ -2066,9 +2060,9 @@ public virtual void RemoveRange(IEnumerable entities) /// in parallel. See Avoiding DbContext threading issues /// for more information. /// - /// - /// - /// See Using Find and FindAsync for more information. + /// + /// See Using Find and FindAsync for more information. + /// /// /// The type of entity to find. /// The values of the primary key for the entity to be found. @@ -2082,13 +2076,13 @@ public virtual void RemoveRange(IEnumerable entities) } /// - /// - /// Finds an entity with the given primary key values. If an entity with the given primary key values - /// is being tracked by the context, then it is returned immediately without making a request to the - /// database. Otherwise, a query is made to the database for an entity with the given primary key values - /// and this entity, if found, is attached to the context and returned. If no entity is found, then - /// null is returned. - /// + /// Finds an entity with the given primary key values. If an entity with the given primary key values + /// is being tracked by the context, then it is returned immediately without making a request to the + /// database. Otherwise, a query is made to the database for an entity with the given primary key values + /// and this entity, if found, is attached to the context and returned. If no entity is found, then + /// null is returned. + /// + /// /// /// Entity Framework Core does not support multiple parallel operations being run on the same DbContext instance. This /// includes both parallel execution of async queries and any explicit concurrent use from multiple threads. @@ -2096,9 +2090,9 @@ public virtual void RemoveRange(IEnumerable entities) /// in parallel. See Avoiding DbContext threading issues /// for more information. /// - /// - /// - /// See Using Find and FindAsync for more information. + /// + /// See Using Find and FindAsync for more information. + /// /// /// The type of entity to find. /// The values of the primary key for the entity to be found. diff --git a/src/EFCore/DbContextId.cs b/src/EFCore/DbContextId.cs index cd13506fecf..7d2af25e324 100644 --- a/src/EFCore/DbContextId.cs +++ b/src/EFCore/DbContextId.cs @@ -7,17 +7,17 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// A unique identifier for the context instance and pool lease, if any. - /// + /// A unique identifier for the context instance and pool lease, if any. + /// + /// /// /// This identifier is primarily intended as a correlation ID for logging and debugging such /// that it is easy to identify that multiple events are using the same or different context instances. /// - /// - /// - /// See DbContext lifetime, configuration, and initialization - /// for more information. + /// + /// See DbContext lifetime, configuration, and initialization + /// for more information. + /// /// public readonly struct DbContextId { @@ -75,29 +75,27 @@ public DbContextId(Guid id, int lease) } /// - /// - /// A unique identifier for the being used. - /// - /// - /// When context pooling is being used, then this ID must be combined with - /// the in order to get a unique ID for the effective instance being used. - /// + /// A unique identifier for the being used. /// + /// + /// When context pooling is being used, then this ID must be combined with + /// the in order to get a unique ID for the effective instance being used. + /// public Guid InstanceId { get; } /// - /// - /// A number that is incremented each time this particular instance is leased - /// from the context pool. - /// - /// - /// Will be zero if context pooling is not being used. - /// + /// A number that is incremented each time this particular instance is leased + /// from the context pool. /// + /// + /// Will be zero if context pooling is not being used. + /// public int Lease { get; } - /// Returns the fully qualified type name of this instance. - /// The fully qualified type name. + /// + /// Returns the instance ID and lease number. + /// + /// The instance ID and lease number. public override string ToString() { return InstanceId + ":" + Lease.ToString(CultureInfo.InvariantCulture); diff --git a/src/EFCore/DbContextOptionsBuilder.cs b/src/EFCore/DbContextOptionsBuilder.cs index 3b606e696a9..0ccfc158f61 100644 --- a/src/EFCore/DbContextOptionsBuilder.cs +++ b/src/EFCore/DbContextOptionsBuilder.cs @@ -19,19 +19,19 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// Provides a simple API surface for configuring . Databases (and other extensions) - /// typically define extension methods on this object that allow you to configure the database connection (and other - /// options) to be used for a context. - /// + /// Provides a simple API surface for configuring . Databases (and other extensions) + /// typically define extension methods on this object that allow you to configure the database connection (and other + /// options) to be used for a context. + /// + /// /// /// You can use to configure a context by overriding /// or creating a /// externally and passing it to the context constructor. /// - /// - /// - /// See Using DbContextOptions for more information. + /// + /// See Using DbContextOptions for more information. + /// /// public class DbContextOptionsBuilder : IDbContextOptionsBuilderInfrastructure { @@ -64,38 +64,34 @@ public virtual DbContextOptions Options => _options; /// - /// - /// Gets a value indicating whether any options have been configured. - /// - /// - /// This can be useful when you have overridden to configure - /// the context, but in some cases you also externally provide options via the context constructor. This property can be - /// used to determine if the options have already been set, and skip some or all of the logic in - /// . - /// + /// Gets a value indicating whether any options have been configured. /// + /// + /// This can be useful when you have overridden to configure + /// the context, but in some cases you also externally provide options via the context constructor. This property can be + /// used to determine if the options have already been set, and skip some or all of the logic in + /// . + /// public virtual bool IsConfigured => _options.Extensions.Any(e => e.Info.IsDatabaseProvider); /// - /// - /// Sets the model to be used for the context. If the model is set, then - /// will not be run. - /// - /// - /// If setting an externally created model should be called first. - /// + /// Sets the model to be used for the context. If the model is set, then + /// will not be run. /// + /// + /// If setting an externally created model should be called first. + /// /// The model to be used. /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder UseModel(IModel model) => WithOption(e => e.WithModel(Check.NotNull(model, nameof(model)))); /// - /// - /// Sets the that will be used to create instances - /// for logging done by this context. - /// + /// Sets the that will be used to create instances + /// for logging done by this context. + /// + /// /// /// There is no need to call this method when using one of the 'AddDbContext' methods, including 'AddDbContextPool'. /// These methods ensure that the used by EF is obtained from the application service provider. @@ -105,30 +101,28 @@ public virtual DbContextOptionsBuilder UseModel(IModel model) /// through a call to . In this case, the /// should be configured directly in that service provider. /// - /// + /// /// The logger factory to be used. /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder UseLoggerFactory(ILoggerFactory? loggerFactory) => WithOption(e => e.WithLoggerFactory(loggerFactory)); /// - /// - /// Logs using the supplied action. For example, use optionsBuilder.LogTo(Console.WriteLine) to - /// log to the console. - /// - /// - /// This overload allows the minimum level of logging and the log formatting to be controlled. - /// Use the - /// - /// overload to log only specific events. - /// Use the - /// overload to log only events in specific categories. - /// Use the - /// overload to use a custom filter for events. - /// Use the overload to log to a fully custom logger. - /// + /// Logs using the supplied action. For example, use optionsBuilder.LogTo(Console.WriteLine) to + /// log to the console. /// + /// + /// This overload allows the minimum level of logging and the log formatting to be controlled. + /// Use the + /// + /// overload to log only specific events. + /// Use the + /// overload to log only events in specific categories. + /// Use the + /// overload to use a custom filter for events. + /// Use the overload to log to a fully custom logger. + /// /// Delegate called when there is a message to log. /// The minimum level of logging event to log. Defaults to /// @@ -142,21 +136,19 @@ public virtual DbContextOptionsBuilder LogTo( => LogTo(action, (i, l) => l >= minimumLevel, options); /// - /// - /// Logs the specified events using the supplied action. For example, use - /// optionsBuilder.LogTo(Console.WriteLine, new[] { CoreEventId.ContextInitialized }) to log the - /// event to the console. - /// - /// - /// Use the overload for default logging of - /// all events. - /// Use the - /// overload to log only events in specific categories. - /// Use the - /// overload to use a custom filter for events. - /// Use the overload to log to a fully custom logger. - /// + /// Logs the specified events using the supplied action. For example, use + /// optionsBuilder.LogTo(Console.WriteLine, new[] { CoreEventId.ContextInitialized }) to log the + /// event to the console. /// + /// + /// Use the overload for default logging of + /// all events. + /// Use the + /// overload to log only events in specific categories. + /// Use the + /// overload to use a custom filter for events. + /// Use the overload to log to a fully custom logger. + /// /// Delegate called when there is a message to log. /// The of each event to log. /// The minimum level of logging event to log. Defaults to @@ -207,21 +199,19 @@ public virtual DbContextOptionsBuilder LogTo( } /// - /// - /// Logs all events in the specified categories using the supplied action. For example, use - /// optionsBuilder.LogTo(Console.WriteLine, new[] { DbLoggerCategory.Infrastructure.Name }) to log all - /// events in the category. - /// - /// - /// Use the overload for default logging of - /// all events. - /// Use the - /// overload to log only specific events. - /// Use the - /// overload to use a custom filter for events. - /// Use the overload to log to a fully custom logger. - /// + /// Logs all events in the specified categories using the supplied action. For example, use + /// optionsBuilder.LogTo(Console.WriteLine, new[] { DbLoggerCategory.Infrastructure.Name }) to log all + /// events in the category. /// + /// + /// Use the overload for default logging of + /// all events. + /// Use the + /// overload to log only specific events. + /// Use the + /// overload to use a custom filter for events. + /// Use the overload to log to a fully custom logger. + /// /// Delegate called when there is a message to log. /// The of each event to log. /// The minimum level of logging event to log. Defaults to @@ -251,20 +241,20 @@ public virtual DbContextOptionsBuilder LogTo( return LogTo( action, (eventId, level) => + { + if (level >= minimumLevel) { - if (level >= minimumLevel) + for (var i = 0; i < categoriesArray.Length; i++) { - for (var i = 0; i < categoriesArray.Length; i++) + if (eventId.Name!.StartsWith(categoriesArray[i], StringComparison.OrdinalIgnoreCase)) { - if (eventId.Name!.StartsWith(categoriesArray[i], StringComparison.OrdinalIgnoreCase)) - { - return true; - } + return true; } } + } - return false; - }, + return false; + }, options); } @@ -277,19 +267,17 @@ public virtual DbContextOptionsBuilder LogTo( } /// - /// - /// Logs events filtered by a supplied custom filter delegate. The filter should return true to - /// log a message, or false to filter it out of the log. - /// - /// - /// Use the overload for default logging of - /// all events. - /// Use the - /// Use the - /// overload to log only events in specific categories. - /// Use the overload to log to a fully custom logger. - /// + /// Logs events filtered by a supplied custom filter delegate. The filter should return true to + /// log a message, or false to filter it out of the log. /// + /// + /// Use the overload for default logging of + /// all events. + /// Use the + /// Use the + /// overload to log only events in specific categories. + /// Use the overload to log to a fully custom logger. + /// /// Delegate called when there is a message to log. /// Delegate that returns true to log the message or false to ignore it. /// @@ -308,20 +296,18 @@ public virtual DbContextOptionsBuilder LogTo( } /// - /// - /// Logs events to a custom logger delegate filtered by a custom filter delegate. The filter should return true to - /// log a message, or false to filter it out of the log. - /// - /// - /// Use the overload for default logging of - /// all events. - /// Use the - /// Use the - /// overload to log only events in specific categories. - /// Use the - /// overload to use a custom filter for events. - /// + /// Logs events to a custom logger delegate filtered by a custom filter delegate. The filter should return true to + /// log a message, or false to filter it out of the log. /// + /// + /// Use the overload for default logging of + /// all events. + /// Use the + /// Use the + /// overload to log only events in specific categories. + /// Use the + /// overload to use a custom filter for events. + /// /// Delegate that returns true to log the message or false to ignore it. /// Delegate called when there is a message to log. /// The same builder instance so that multiple calls can be chained. @@ -340,12 +326,12 @@ private DbContextOptionsBuilder LogTo(IDbContextLogger logger) => WithOption(e => e.WithDbContextLogger(logger)); /// - /// - /// Disables concurrency detection, which detects many cases of erroneous concurrent usage of a - /// instance and causes an informative exception to be thrown. This provides a minor performance improvement, but if a - /// instance is used concurrently, the behavior will be undefined and the program may fail in - /// unpredictable ways. - /// + /// Disables concurrency detection, which detects many cases of erroneous concurrent usage of a + /// instance and causes an informative exception to be thrown. This provides a minor performance improvement, but if a + /// instance is used concurrently, the behavior will be undefined and the program may fail in + /// unpredictable ways. + /// + /// /// /// Only disable concurrency detection after confirming that the performance gains are considerable, and the application has /// been thoroughly tested against concurrency bugs. @@ -356,19 +342,19 @@ private DbContextOptionsBuilder LogTo(IDbContextLogger logger) /// for all uses of that service provider. Consider instead not calling /// so that EF will manage the service providers and can create new instances as required. /// - /// + /// /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder EnableThreadSafetyChecks(bool enableChecks = true) => WithOption(e => e.WithThreadSafetyChecksEnabled(enableChecks)); /// - /// - /// Enables detailed errors when handling of data value exceptions that occur during processing of store query results. Such errors - /// most often occur due to misconfiguration of entity properties. E.g. If a property is configured to be of type - /// 'int', but the underlying data in the store is actually of type 'string', then an exception will be generated - /// at runtime during processing of the data value. When this option is enabled and a data error is encountered, the - /// generated exception will include details of the specific entity property that generated the error. - /// + /// Enables detailed errors when handling of data value exceptions that occur during processing of store query results. Such errors + /// most often occur due to misconfiguration of entity properties. E.g. If a property is configured to be of type + /// 'int', but the underlying data in the store is actually of type 'string', then an exception will be generated + /// at runtime during processing of the data value. When this option is enabled and a data error is encountered, the + /// generated exception will include details of the specific entity property that generated the error. + /// + /// /// /// Enabling this option incurs a small performance overhead during query execution. /// @@ -378,15 +364,15 @@ public virtual DbContextOptionsBuilder EnableThreadSafetyChecks(bool enableCheck /// for all uses of that service provider. Consider instead not calling /// so that EF will manage the service providers and can create new instances as required. /// - /// + /// /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder EnableDetailedErrors(bool detailedErrorsEnabled = true) => WithOption(e => e.WithDetailedErrorsEnabled(detailedErrorsEnabled)); /// - /// - /// Sets the to be used for query caching by this context. - /// + /// Sets the to be used for query caching by this context. + /// + /// /// /// Note that changing the memory cache can cause EF to build a new internal service provider, which /// may cause issues with performance. Generally it is expected that no more than one or two different @@ -397,17 +383,17 @@ public virtual DbContextOptionsBuilder EnableDetailedErrors(bool detailedErrorsE /// through a call to . In this case, the /// should be configured directly in that service provider. /// - /// + /// /// The memory cache to be used. /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder UseMemoryCache(IMemoryCache? memoryCache) => WithOption(e => e.WithMemoryCache(memoryCache)); /// - /// - /// Sets the that the context should resolve all of its services from. EF will - /// create and manage a service provider if none is specified. - /// + /// Sets the that the context should resolve all of its services from. EF will + /// create and manage a service provider if none is specified. + /// + /// /// /// The service provider must contain all the services required by Entity Framework (and the database being /// used). The Entity Framework services can be registered using an extension method on . @@ -419,7 +405,7 @@ public virtual DbContextOptionsBuilder UseMemoryCache(IMemoryCache? memoryCache) /// registered, then this will be used as the options for /// this context instance. /// - /// + /// /// The service provider to be used. /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder UseInternalServiceProvider(IServiceProvider? serviceProvider) @@ -436,47 +422,43 @@ public virtual DbContextOptionsBuilder UseApplicationServiceProvider(IServicePro => WithOption(e => e.WithApplicationServiceProvider(serviceProvider)); /// - /// - /// Enables application data to be included in exception messages, logging, etc. This can include the - /// values assigned to properties of your entity instances, parameter values for commands being sent - /// to the database, and other such data. You should only enable this flag if you have the appropriate - /// security measures in place based on the sensitivity of this data. - /// - /// - /// Note that if the application is setting the internal service provider through a call to - /// , then this option must configured the same way - /// for all uses of that service provider. Consider instead not calling - /// so that EF will manage the service providers and can create new instances as required. - /// + /// Enables application data to be included in exception messages, logging, etc. This can include the + /// values assigned to properties of your entity instances, parameter values for commands being sent + /// to the database, and other such data. You should only enable this flag if you have the appropriate + /// security measures in place based on the sensitivity of this data. /// + /// + /// Note that if the application is setting the internal service provider through a call to + /// , then this option must configured the same way + /// for all uses of that service provider. Consider instead not calling + /// so that EF will manage the service providers and can create new instances as required. + /// /// If , then sensitive data is logged. /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder EnableSensitiveDataLogging(bool sensitiveDataLoggingEnabled = true) => WithOption(e => e.WithSensitiveDataLoggingEnabled(sensitiveDataLoggingEnabled)); /// - /// - /// Enables or disables caching of internal service providers. Disabling caching can - /// massively impact performance and should only be used in testing scenarios that - /// build many service providers for test isolation. - /// - /// - /// Note that if the application is setting the internal service provider through a call to - /// , then setting this option wil have no effect. - /// + /// Enables or disables caching of internal service providers. Disabling caching can + /// massively impact performance and should only be used in testing scenarios that + /// build many service providers for test isolation. /// + /// + /// Note that if the application is setting the internal service provider through a call to + /// , then setting this option wil have no effect. + /// /// If , then the internal service provider is cached. /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder EnableServiceProviderCaching(bool cacheServiceProvider = true) => WithOption(e => e.WithServiceProviderCachingEnabled(cacheServiceProvider)); /// - /// - /// Sets the tracking behavior for LINQ queries run against the context. Disabling change tracking - /// is useful for read-only scenarios because it avoids the overhead of setting up change tracking for each - /// entity instance. You should not disable change tracking if you want to manipulate entity instances and - /// persist those changes to the database using . - /// + /// Sets the tracking behavior for LINQ queries run against the context. Disabling change tracking + /// is useful for read-only scenarios because it avoids the overhead of setting up change tracking for each + /// entity instance. You should not disable change tracking if you want to manipulate entity instances and + /// persist those changes to the database using . + /// + /// /// /// This method sets the default behavior for all contexts created with these options, but you can override this /// behavior for a context instance using or on individual @@ -487,16 +469,16 @@ public virtual DbContextOptionsBuilder EnableServiceProviderCaching(bool cacheSe /// The default value is . This means /// the change tracker will keep track of changes for all entities that are returned from a LINQ query. /// - /// + /// /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder UseQueryTrackingBehavior(QueryTrackingBehavior queryTrackingBehavior) => WithOption(e => e.WithQueryTrackingBehavior(queryTrackingBehavior)); /// - /// - /// Configures the runtime behavior of warnings generated by Entity Framework. You can set a default - /// behavior and behaviors for each warning type. - /// + /// Configures the runtime behavior of warnings generated by Entity Framework. You can set a default + /// behavior and behaviors for each warning type. + /// + /// /// /// Note that changing this configuration can cause EF to build a new internal service provider, which /// may cause issues with performance. Generally it is expected that no more than one or two different @@ -508,7 +490,7 @@ public virtual DbContextOptionsBuilder UseQueryTrackingBehavior(QueryTrackingBeh /// for all uses of that service provider. Consider instead not calling /// so that EF will manage the service providers and can create new instances as required. /// - /// + /// /// /// /// optionsBuilder.ConfigureWarnings(warnings => @@ -532,10 +514,10 @@ public virtual DbContextOptionsBuilder ConfigureWarnings( } /// - /// - /// Replaces all internal Entity Framework implementations of a service contract with a different - /// implementation. - /// + /// Replaces all internal Entity Framework implementations of a service contract with a different + /// implementation. + /// + /// /// /// This method can only be used when EF is building and managing its internal service provider. /// If the service provider is being built externally and passed to @@ -545,7 +527,7 @@ public virtual DbContextOptionsBuilder ConfigureWarnings( /// /// The replacement service gets the same scope as the EF service that it is replacing. /// - /// + /// /// The type (usually an interface) that defines the contract of the service to replace. /// The new implementation type for the service. /// The same builder instance so that multiple calls can be chained. @@ -554,10 +536,10 @@ public virtual DbContextOptionsBuilder ReplaceService => WithOption(e => e.WithReplacedService(typeof(TService), typeof(TImplementation))); /// - /// - /// Replaces the internal Entity Framework implementation of a specific implementation of a service contract - /// with a different implementation. - /// + /// Replaces the internal Entity Framework implementation of a specific implementation of a service contract + /// with a different implementation. + /// + /// /// /// This method is useful for replacing a single instance of services that can be legitimately registered /// multiple times in the EF internal service provider. @@ -571,7 +553,7 @@ public virtual DbContextOptionsBuilder ReplaceService /// /// The replacement service gets the same scope as the EF service that it is replacing. /// - /// + /// /// The type (usually an interface) that defines the contract of the service to replace. /// The current implementation type for the service. /// The new implementation type for the service. @@ -582,9 +564,9 @@ public virtual DbContextOptionsBuilder ReplaceService WithOption(e => e.WithReplacedService(typeof(TService), typeof(TNewImplementation), typeof(TCurrentImplementation))); /// - /// - /// Adds instances to those registered on the context. - /// + /// Adds instances to those registered on the context. + /// + /// /// /// Interceptors can be used to view, change, or suppress operations taken by Entity Framework. /// See the specific implementations of for details. For example, 'IDbCommandInterceptor'. @@ -603,16 +585,16 @@ public virtual DbContextOptionsBuilder ReplaceService - /// + /// /// The interceptors to add. /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder AddInterceptors(IEnumerable interceptors) => WithOption(e => e.WithInterceptors(Check.NotNull(interceptors, nameof(interceptors)))); /// - /// - /// Adds instances to those registered on the context. - /// + /// Adds instances to those registered on the context. + /// + /// /// /// Interceptors can be used to view, change, or suppress operations taken by Entity Framework. /// See the specific implementations of for details. For example, 'IDbCommandInterceptor'. @@ -627,36 +609,32 @@ public virtual DbContextOptionsBuilder AddInterceptors(IEnumerable /// Calling this method multiple times will result in all interceptors in every call being added to the context. /// Interceptors added in a previous call are not overridden by interceptors added in a later call. /// - /// + /// /// The interceptors to add. /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder AddInterceptors(params IInterceptor[] interceptors) => AddInterceptors((IEnumerable)interceptors); /// - /// - /// Configures how long EF Core will cache logging configuration in certain high-performance paths. This makes - /// EF Core skip potentially costly logging checks, but means that runtime logging changes (e.g. registering a - /// new may not be taken into account right away). - /// - /// - /// Defaults to one second. - /// + /// Configures how long EF Core will cache logging configuration in certain high-performance paths. This makes + /// EF Core skip potentially costly logging checks, but means that runtime logging changes (e.g. registering a + /// new may not be taken into account right away). /// + /// + /// Defaults to one second. + /// /// The maximum time period over which to skip logging checks before checking again. /// The same builder instance so that multiple calls can be chained. public virtual DbContextOptionsBuilder ConfigureLoggingCacheTime(TimeSpan timeSpan) => WithOption(e => e.WithLoggingCacheTime(timeSpan)); /// - /// - /// Adds the given extension to the options. If an existing extension of the same type already exists, it will be replaced. - /// - /// - /// This method is intended for use by extension methods to configure the context. It is not intended to be used in - /// application code. - /// + /// Adds the given extension to the options. If an existing extension of the same type already exists, it will be replaced. /// + /// + /// This method is intended for use by extension methods to configure the context. It is not intended to be used in + /// application code. + /// /// The type of extension to be added. /// The extension to be added. void IDbContextOptionsBuilderInfrastructure.AddOrUpdateExtension(TExtension extension) diff --git a/src/EFCore/DbContextOptionsBuilder`.cs b/src/EFCore/DbContextOptionsBuilder`.cs index e25af67c56e..30391179296 100644 --- a/src/EFCore/DbContextOptionsBuilder`.cs +++ b/src/EFCore/DbContextOptionsBuilder`.cs @@ -15,19 +15,19 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// Provides a simple API surface for configuring . Databases (and other extensions) - /// typically define extension methods on this object that allow you to configure the database connection (and other - /// options) to be used for a context. - /// + /// Provides a simple API surface for configuring . Databases (and other extensions) + /// typically define extension methods on this object that allow you to configure the database connection (and other + /// options) to be used for a context. + /// + /// /// /// You can use to configure a context by overriding /// or creating a /// externally and passing it to the context constructor. /// - /// - /// - /// See Using DbContextOptions for more information. + /// + /// See Using DbContextOptions for more information. + /// /// /// The type of context to be configured. public class DbContextOptionsBuilder : DbContextOptionsBuilder @@ -67,10 +67,10 @@ public DbContextOptionsBuilder(DbContextOptions options) => (DbContextOptionsBuilder)base.UseModel(model); /// - /// - /// Sets the that will be used to create instances - /// for logging done by this context. - /// + /// Sets the that will be used to create instances + /// for logging done by this context. + /// + /// /// /// There is no need to call this method when using one of the /// methods. 'AddDbContext' will ensure that the used by EF is obtained from the @@ -81,17 +81,17 @@ public DbContextOptionsBuilder(DbContextOptions options) /// through a call to . In this case, the /// should be configured directly in that service provider. /// - /// + /// /// The logger factory to be used. /// The same builder instance so that multiple calls can be chained. public new virtual DbContextOptionsBuilder UseLoggerFactory(ILoggerFactory? loggerFactory) => (DbContextOptionsBuilder)base.UseLoggerFactory(loggerFactory); /// - /// - /// Logs using the supplied action. For example, use optionsBuilder.LogTo(Console.WriteLine) to - /// log to the console. - /// + /// Logs using the supplied action. For example, use optionsBuilder.LogTo(Console.WriteLine) to + /// log to the console. + /// + /// /// /// This overload allows the minimum level of logging and the log formatting to be controlled. /// Use the @@ -104,7 +104,7 @@ public DbContextOptionsBuilder(DbContextOptions options) /// overload to use a custom filter for events. /// Use the overload to log to a fully custom logger. /// - /// + /// /// Delegate called when there is a message to log. /// The minimum level of logging event to log. Defaults to /// @@ -118,21 +118,19 @@ public DbContextOptionsBuilder(DbContextOptions options) => (DbContextOptionsBuilder)base.LogTo(action, minimumLevel, options); /// - /// - /// Logs the specified events using the supplied action. For example, use - /// optionsBuilder.LogTo(Console.WriteLine, new[] { CoreEventId.ContextInitialized }) to log the - /// event to the console. - /// - /// - /// Use the overload for default logging of - /// all events. - /// Use the - /// overload to log only events in specific categories. - /// Use the - /// overload to use a custom filter for events. - /// Use the overload to log to a fully custom logger. - /// + /// Logs the specified events using the supplied action. For example, use + /// optionsBuilder.LogTo(Console.WriteLine, new[] { CoreEventId.ContextInitialized }) to log the + /// event to the console. /// + /// + /// Use the overload for default logging of + /// all events. + /// Use the + /// overload to log only events in specific categories. + /// Use the + /// overload to use a custom filter for events. + /// Use the overload to log to a fully custom logger. + /// /// Delegate called when there is a message to log. /// The of each event to log. /// The minimum level of logging event to log. Defaults to @@ -148,21 +146,19 @@ public DbContextOptionsBuilder(DbContextOptions options) => (DbContextOptionsBuilder)base.LogTo(action, events, minimumLevel, options); /// - /// - /// Logs all events in the specified categories using the supplied action. For example, use - /// optionsBuilder.LogTo(Console.WriteLine, new[] { DbLoggerCategory.Infrastructure.Name }) to log all - /// events in the category. - /// - /// - /// Use the overload for default logging of - /// all events. - /// Use the - /// overload to log only specific events. - /// Use the - /// overload to use a custom filter for events. - /// Use the overload to log to a fully custom logger. - /// + /// Logs all events in the specified categories using the supplied action. For example, use + /// optionsBuilder.LogTo(Console.WriteLine, new[] { DbLoggerCategory.Infrastructure.Name }) to log all + /// events in the category. /// + /// + /// Use the overload for default logging of + /// all events. + /// Use the + /// overload to log only specific events. + /// Use the + /// overload to use a custom filter for events. + /// Use the overload to log to a fully custom logger. + /// /// Delegate called when there is a message to log. /// The of each event to log. /// The minimum level of logging event to log. Defaults to @@ -178,19 +174,17 @@ public DbContextOptionsBuilder(DbContextOptions options) => (DbContextOptionsBuilder)base.LogTo(action, categories, minimumLevel, options); /// - /// - /// Logs events filtered by a supplied custom filter delegate. The filter should return true to - /// log a message, or false to filter it out of the log. - /// - /// - /// Use the overload for default logging of - /// all events. - /// Use the - /// Use the - /// overload to log only events in specific categories. - /// Use the overload to log to a fully custom logger. - /// + /// Logs events filtered by a supplied custom filter delegate. The filter should return true to + /// log a message, or false to filter it out of the log. /// + /// + /// Use the overload for default logging of + /// all events. + /// Use the + /// Use the + /// overload to log only events in specific categories. + /// Use the overload to log to a fully custom logger. + /// /// Delegate called when there is a message to log. /// Delegate that returns true to log the message or false to ignore it. /// @@ -204,20 +198,18 @@ public DbContextOptionsBuilder(DbContextOptions options) => (DbContextOptionsBuilder)base.LogTo(action, filter, options); /// - /// - /// Logs events to a custom logger delegate filtered by a custom filter delegate. The filter should return true to - /// log a message, or false to filter it out of the log. - /// - /// - /// Use the overload for default logging of - /// all events. - /// Use the - /// Use the - /// overload to log only events in specific categories. - /// Use the - /// overload to use a custom filter for events. - /// + /// Logs events to a custom logger delegate filtered by a custom filter delegate. The filter should return true to + /// log a message, or false to filter it out of the log. /// + /// + /// Use the overload for default logging of + /// all events. + /// Use the + /// Use the + /// overload to log only events in specific categories. + /// Use the + /// overload to use a custom filter for events. + /// /// Delegate that returns true to log the message or false to ignore it. /// Delegate called when there is a message to log. /// The same builder instance so that multiple calls can be chained. @@ -228,12 +220,12 @@ public DbContextOptionsBuilder(DbContextOptions options) => (DbContextOptionsBuilder)base.LogTo(filter, logger); /// - /// - /// Disables concurrency detection, which detects many cases of erroneous concurrent usage of a - /// instance and causes an informative exception to be thrown. This provides a minor performance improvement, but if a - /// instance is used concurrently, the behavior will be undefined and the program may fail in - /// unpredictable ways. - /// + /// Disables concurrency detection, which detects many cases of erroneous concurrent usage of a + /// instance and causes an informative exception to be thrown. This provides a minor performance improvement, but if a + /// instance is used concurrently, the behavior will be undefined and the program may fail in + /// unpredictable ways. + /// + /// /// /// Only disable concurrency detection after confirming that the performance gains are considerable, and the application has /// been thoroughly tested against concurrency bugs. @@ -244,19 +236,19 @@ public DbContextOptionsBuilder(DbContextOptions options) /// for all uses of that service provider. Consider instead not calling /// so that EF will manage the service providers and can create new instances as required. /// - /// + /// /// The same builder instance so that multiple calls can be chained. public new virtual DbContextOptionsBuilder EnableThreadSafetyChecks(bool checksEnabled = true) => (DbContextOptionsBuilder)base.EnableThreadSafetyChecks(checksEnabled); /// - /// - /// Enables detailed errors when handling data value exceptions that occur during processing of store query results. Such errors - /// most often occur due to misconfiguration of entity properties. E.g. If a property is configured to be of type - /// 'int', but the underlying data in the store is actually of type 'string', then an exception will be generated - /// at runtime during processing of the data value. When this option is enabled and a data error is encountered, the - /// generated exception will include details of the specific entity property that generated the error. - /// + /// Enables detailed errors when handling data value exceptions that occur during processing of store query results. Such errors + /// most often occur due to misconfiguration of entity properties. E.g. If a property is configured to be of type + /// 'int', but the underlying data in the store is actually of type 'string', then an exception will be generated + /// at runtime during processing of the data value. When this option is enabled and a data error is encountered, the + /// generated exception will include details of the specific entity property that generated the error. + /// + /// /// /// Enabling this option incurs a small performance overhead during query execution. /// @@ -266,15 +258,15 @@ public DbContextOptionsBuilder(DbContextOptions options) /// for all uses of that service provider. Consider instead not calling /// so that EF will manage the service providers and can create new instances as required. /// - /// + /// /// The same builder instance so that multiple calls can be chained. public new virtual DbContextOptionsBuilder EnableDetailedErrors(bool detailedErrorsEnabled = true) => (DbContextOptionsBuilder)base.EnableDetailedErrors(detailedErrorsEnabled); /// - /// - /// Sets the to be used for query caching by this context. - /// + /// Sets the to be used for query caching by this context. + /// + /// /// /// Note that changing the memory cache can cause EF to build a new internal service provider, which /// may cause issues with performance. Generally it is expected that no more than one or two different @@ -285,17 +277,17 @@ public DbContextOptionsBuilder(DbContextOptions options) /// through a call to . In this case, the /// should be configured directly in that service provider. /// - /// + /// /// The memory cache to be used. /// The same builder instance so that multiple calls can be chained. public new virtual DbContextOptionsBuilder UseMemoryCache(IMemoryCache? memoryCache) => (DbContextOptionsBuilder)base.UseMemoryCache(memoryCache); /// - /// - /// Sets the that the context should resolve all of its services from. EF will - /// create and manage a service provider if none is specified. - /// + /// Sets the that the context should resolve all of its services from. EF will + /// create and manage a service provider if none is specified. + /// + /// /// /// The service provider must contain all the services required by Entity Framework (and the database being /// used). The Entity Framework services can be registered using an extension method on . @@ -307,7 +299,7 @@ public DbContextOptionsBuilder(DbContextOptions options) /// registered, then this will be used as the options for /// this context instance. /// - /// + /// /// The service provider to be used. /// The same builder instance so that multiple calls can be chained. public new virtual DbContextOptionsBuilder UseInternalServiceProvider(IServiceProvider? serviceProvider) @@ -323,46 +315,42 @@ public DbContextOptionsBuilder(DbContextOptions options) => (DbContextOptionsBuilder)base.UseApplicationServiceProvider(serviceProvider); /// - /// - /// Enables application data to be included in exception messages, logging, etc. This can include the - /// values assigned to properties of your entity instances, parameter values for commands being sent - /// to the database, and other such data. You should only enable this flag if you have the appropriate - /// security measures in place based on the sensitivity of this data. - /// - /// - /// Note that if the application is setting the internal service provider through a call to - /// , then this option must configured the same way - /// for all uses of that service provider. Consider instead not calling - /// so that EF will manage the service providers and can create new instances as required. - /// + /// Enables application data to be included in exception messages, logging, etc. This can include the + /// values assigned to properties of your entity instances, parameter values for commands being sent + /// to the database, and other such data. You should only enable this flag if you have the appropriate + /// security measures in place based on the sensitivity of this data. /// + /// + /// Note that if the application is setting the internal service provider through a call to + /// , then this option must configured the same way + /// for all uses of that service provider. Consider instead not calling + /// so that EF will manage the service providers and can create new instances as required. + /// /// The same builder instance so that multiple calls can be chained. public new virtual DbContextOptionsBuilder EnableSensitiveDataLogging(bool sensitiveDataLoggingEnabled = true) => (DbContextOptionsBuilder)base.EnableSensitiveDataLogging(sensitiveDataLoggingEnabled); /// - /// - /// Enables or disables caching of internal service providers. Disabling caching can - /// massively impact performance and should only be used in testing scenarios that - /// build many service providers for test isolation. - /// - /// - /// Note that if the application is setting the internal service provider through a call to - /// , then setting this option wil have no effect. - /// + /// Enables or disables caching of internal service providers. Disabling caching can + /// massively impact performance and should only be used in testing scenarios that + /// build many service providers for test isolation. /// + /// + /// Note that if the application is setting the internal service provider through a call to + /// , then setting this option wil have no effect. + /// /// If , then the internal service provider is cached. /// The same builder instance so that multiple calls can be chained. public new virtual DbContextOptionsBuilder EnableServiceProviderCaching(bool cacheServiceProvider = true) => (DbContextOptionsBuilder)base.EnableServiceProviderCaching(cacheServiceProvider); /// - /// - /// Sets the tracking behavior for LINQ queries run against the context. Disabling change tracking - /// is useful for read-only scenarios because it avoids the overhead of setting up change tracking for each - /// entity instance. You should not disable change tracking if you want to manipulate entity instances and - /// persist those changes to the database using . - /// + /// Sets the tracking behavior for LINQ queries run against the context. Disabling change tracking + /// is useful for read-only scenarios because it avoids the overhead of setting up change tracking for each + /// entity instance. You should not disable change tracking if you want to manipulate entity instances and + /// persist those changes to the database using . + /// + /// /// /// This method sets the default behavior for all contexts created with these options, but you can override this /// behavior for a context instance using or on individual @@ -373,15 +361,15 @@ public DbContextOptionsBuilder(DbContextOptions options) /// The default value is . This means the /// change tracker will keep track of changes for all entities that are returned from a LINQ query. /// - /// + /// public new virtual DbContextOptionsBuilder UseQueryTrackingBehavior(QueryTrackingBehavior queryTrackingBehavior) => (DbContextOptionsBuilder)base.UseQueryTrackingBehavior(queryTrackingBehavior); /// - /// - /// Configures the runtime behavior of warnings generated by Entity Framework. You can set a default - /// behavior and behaviors for each warning type. - /// + /// Configures the runtime behavior of warnings generated by Entity Framework. You can set a default + /// behavior and behaviors for each warning type. + /// + /// /// /// Note that changing this configuration can cause EF to build a new internal service provider, which /// may cause issues with performance. Generally it is expected that no more than one or two different @@ -393,7 +381,7 @@ public DbContextOptionsBuilder(DbContextOptions options) /// for all uses of that service provider. Consider instead not calling /// so that EF will manage the service providers and can create new instances as required. /// - /// + /// /// /// /// optionsBuilder.ConfigureWarnings(warnings => @@ -411,10 +399,10 @@ public DbContextOptionsBuilder(DbContextOptions options) => (DbContextOptionsBuilder)base.ConfigureWarnings(warningsConfigurationBuilderAction); /// - /// - /// Replaces all internal Entity Framework implementations of a service contract with a different - /// implementation. - /// + /// Replaces all internal Entity Framework implementations of a service contract with a different + /// implementation. + /// + /// /// /// This method can only be used when EF is building and managing its internal service provider. /// If the service provider is being built externally and passed to @@ -424,7 +412,7 @@ public DbContextOptionsBuilder(DbContextOptions options) /// /// The replacement service gets the same scope as the EF service that it is replacing. /// - /// + /// /// The type (usually an interface) that defines the contract of the service to replace. /// The new implementation type for the service. /// The same builder instance so that multiple calls can be chained. @@ -433,10 +421,10 @@ public DbContextOptionsBuilder(DbContextOptions options) => (DbContextOptionsBuilder)base.ReplaceService(); /// - /// - /// Replaces the internal Entity Framework implementation of a specific implementation of a service contract - /// with a different implementation. - /// + /// Replaces the internal Entity Framework implementation of a specific implementation of a service contract + /// with a different implementation. + /// + /// /// /// This method is useful for replacing a single instance of services that can be legitimately registered /// multiple times in the EF internal service provider. @@ -450,7 +438,7 @@ public DbContextOptionsBuilder(DbContextOptions options) /// /// The replacement service gets the same scope as the EF service that it is replacing. /// - /// + /// /// The type (usually an interface) that defines the contract of the service to replace. /// The current implementation type for the service. /// The new implementation type for the service. @@ -461,9 +449,9 @@ public DbContextOptionsBuilder(DbContextOptions options) => (DbContextOptionsBuilder)base.ReplaceService(); /// - /// - /// Adds instances to those registered on the context. - /// + /// Adds instances to those registered on the context. + /// + /// /// /// Interceptors can be used to view, change, or suppress operations taken by Entity Framework. /// See the specific implementations of for details. For example, 'IDbCommandInterceptor'. @@ -482,16 +470,16 @@ public DbContextOptionsBuilder(DbContextOptions options) /// Calling this method multiple times will result in all interceptors in every call being added to the context. /// Interceptors added in a previous call are not overridden by interceptors added in a later call. /// - /// + /// /// The interceptors to add. /// The same builder instance so that multiple calls can be chained. public new virtual DbContextOptionsBuilder AddInterceptors(IEnumerable interceptors) => (DbContextOptionsBuilder)base.AddInterceptors(interceptors); /// - /// - /// Adds instances to those registered on the context. - /// + /// Adds instances to those registered on the context. + /// + /// /// /// Interceptors can be used to view, change, or suppress operations taken by Entity Framework. /// See the specific implementations of for details. For example, 'IDbCommandInterceptor'. @@ -506,22 +494,20 @@ public DbContextOptionsBuilder(DbContextOptions options) /// Calling this method multiple times will result in all interceptors in every call being added to the context. /// Interceptors added in a previous call are not overridden by interceptors added in a later call. /// - /// + /// /// The interceptors to add. /// The same builder instance so that multiple calls can be chained. public new virtual DbContextOptionsBuilder AddInterceptors(params IInterceptor[] interceptors) => (DbContextOptionsBuilder)base.AddInterceptors(interceptors); /// - /// - /// Configures how long EF Core will cache logging configuration in certain high-performance paths. This makes - /// EF Core skip potentially costly logging checks, but means that runtime logging changes (e.g. registering a - /// new may not be taken into account right away). - /// - /// - /// Defaults to one second. - /// + /// Configures how long EF Core will cache logging configuration in certain high-performance paths. This makes + /// EF Core skip potentially costly logging checks, but means that runtime logging changes (e.g. registering a + /// new may not be taken into account right away). /// + /// + /// Defaults to one second. + /// /// The maximum time period over which to skip logging checks before checking again. /// The same builder instance so that multiple calls can be chained. public new virtual DbContextOptionsBuilder ConfigureLoggingCacheTime(TimeSpan timeSpan) diff --git a/src/EFCore/DbFunctionsExtensions.cs b/src/EFCore/DbFunctionsExtensions.cs index ec7641e3cfe..7c768fbd2a6 100644 --- a/src/EFCore/DbFunctionsExtensions.cs +++ b/src/EFCore/DbFunctionsExtensions.cs @@ -17,18 +17,18 @@ namespace Microsoft.EntityFrameworkCore public static class DbFunctionsExtensions { /// - /// - /// An implementation of the SQL LIKE operation. On relational databases this is usually directly - /// translated to SQL. - /// + /// An implementation of the SQL LIKE operation. On relational databases this is usually directly + /// translated to SQL. + /// + /// /// /// Note that the semantics of the comparison will depend on the database configuration. /// In particular, it may be either case-sensitive or case-insensitive. /// - /// - /// - /// This DbFunction method has no in-memory implementation and will throw if the query switches to client-evaluation. - /// This can happen if the query contains one or more expressions that could not be translated to the store. + /// + /// This DbFunction method has no in-memory implementation and will throw if the query switches to client-evaluation. + /// This can happen if the query contains one or more expressions that could not be translated to the store. + /// /// /// The instance. /// The string that is to be matched. @@ -41,18 +41,18 @@ public static bool Like( => throw new InvalidOperationException(CoreStrings.FunctionOnClient(nameof(Like))); /// - /// - /// An implementation of the SQL LIKE operation. On relational databases this is usually directly - /// translated to SQL. - /// + /// An implementation of the SQL LIKE operation. On relational databases this is usually directly + /// translated to SQL. + /// + /// /// /// Note that the semantics of the comparison will depend on the database configuration. /// In particular, it may be either case-sensitive or case-insensitive. /// - /// - /// - /// This DbFunction method has no in-memory implementation and will throw if the query switches to client-evaluation. - /// This can happen if the query contains one or more expressions that could not be translated to the store. + /// + /// This DbFunction method has no in-memory implementation and will throw if the query switches to client-evaluation. + /// This can happen if the query contains one or more expressions that could not be translated to the store. + /// /// /// The instance. /// The string that is to be matched. diff --git a/src/EFCore/DbLoggerCategory.cs b/src/EFCore/DbLoggerCategory.cs index 4ccd4668f8c..7f012476b67 100644 --- a/src/EFCore/DbLoggerCategory.cs +++ b/src/EFCore/DbLoggerCategory.cs @@ -6,9 +6,9 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// An API for getting logger categories in an Intellisense/tab-completion friendly manner. - /// + /// An API for getting logger categories in an Intellisense/tab-completion friendly manner. + /// + /// /// /// Get an Entity Framework Core logger category using its Name property. For example, /// LoggerCategory.Database.Sql.Name. @@ -17,9 +17,9 @@ namespace Microsoft.EntityFrameworkCore /// Use these types with or /// to create a logger. /// - /// - /// - /// See Logging, events, and diagnostics for more information. + /// + /// See Logging, events, and diagnostics for more information. + /// /// public static class DbLoggerCategory { diff --git a/src/EFCore/DbSet.cs b/src/EFCore/DbSet.cs index 8414f8ed5da..9a9f21be6c0 100644 --- a/src/EFCore/DbSet.cs +++ b/src/EFCore/DbSet.cs @@ -17,10 +17,10 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// A can be used to query and save instances of . - /// LINQ queries against a will be translated into queries against the database. - /// + /// A can be used to query and save instances of . + /// LINQ queries against a will be translated into queries against the database. + /// + /// /// /// The results of a LINQ query against a will contain the results /// returned from the database and may not reflect changes made in the context that have not @@ -42,11 +42,11 @@ namespace Microsoft.EntityFrameworkCore /// Therefore, always await async calls immediately, or use separate DbContext instances for operations that execute /// in parallel. See Avoiding DbContext threading issues for more information. /// - /// - /// - /// See DbContext lifetime, configuration, and initialization, - /// Querying data with EF Core, and - /// Changing tracking for more information. + /// + /// See DbContext lifetime, configuration, and initialization, + /// Querying data with EF Core, and + /// Changing tracking for more information. + /// /// /// The type of entity being operated on by this set. public abstract class DbSet : IQueryable, IInfrastructure, IListSource @@ -68,26 +68,26 @@ public virtual IAsyncEnumerable AsAsyncEnumerable() => (IAsyncEnumerable)this; /// - /// - /// Returns this object typed as . - /// + /// Returns this object typed as . + /// + /// /// /// This is a convenience method to help with disambiguation of extension methods in the same /// namespace that extend both interfaces. /// - /// - /// - /// See Querying data with EF Core for more information. + /// + /// See Querying data with EF Core for more information. + /// /// /// This object. public virtual IQueryable AsQueryable() => this; /// - /// - /// Gets a that represents a local view of all Added, Unchanged, - /// and Modified entities in this set. - /// + /// Gets a that represents a local view of all Added, Unchanged, + /// and Modified entities in this set. + /// + /// /// /// This local view will stay in sync as entities are added or removed from the context. Likewise, entities /// added to or removed from the local view will automatically be added to or removed @@ -104,9 +104,9 @@ public virtual IQueryable AsQueryable() /// Note that this method calls unless /// has been set to . /// - /// - /// - /// See Local views of tracked entities in EF Core for more information. + /// + /// See Local views of tracked entities in EF Core for more information. + /// /// public virtual LocalView Local => throw new NotSupportedException(); @@ -159,17 +159,17 @@ public virtual LocalView Local => throw new NotSupportedException(); /// + /// Begins tracking the given entity, and any other reachable entities that are + /// not already being tracked, in the state such that they will + /// be inserted into the database when is called. + /// + /// /// - /// Begins tracking the given entity, and any other reachable entities that are - /// not already being tracked, in the state such that they will - /// be inserted into the database when is called. + /// Use to set the state of only a single entity. /// /// - /// Use to set the state of only a single entity. + /// See EF Core change tracking for more information. /// - /// - /// - /// See EF Core change tracking for more information. /// /// The entity to add. /// @@ -180,11 +180,11 @@ public virtual EntityEntry Add(TEntity entity) => throw new NotSupportedException(); /// - /// - /// Begins tracking the given entity, and any other reachable entities that are - /// not already being tracked, in the state such that they will - /// be inserted into the database when is called. - /// + /// Begins tracking the given entity, and any other reachable entities that are + /// not already being tracked, in the state such that they will + /// be inserted into the database when is called. + /// + /// /// /// This method is async only to allow special value generators, such as the one used by /// 'Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy.SequenceHiLo', @@ -193,9 +193,9 @@ public virtual EntityEntry Add(TEntity entity) /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking for more information. + /// + /// See EF Core change tracking for more information. + /// /// /// The entity to add. /// A to observe while waiting for the task to complete. @@ -211,11 +211,11 @@ public virtual ValueTask> AddAsync( => throw new NotSupportedException(); /// - /// - /// Begins tracking the given entity and entries reachable from the given entity using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entity and entries reachable from the given entity using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -238,9 +238,9 @@ public virtual ValueTask> AddAsync( /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking for more information. + /// + /// See EF Core change tracking for more information. + /// /// /// The entity to attach. /// @@ -281,11 +281,11 @@ public virtual EntityEntry Remove(TEntity entity) => throw new NotSupportedException(); /// - /// - /// Begins tracking the given entity and entries reachable from the given entity using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entity and entries reachable from the given entity using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -308,9 +308,9 @@ public virtual EntityEntry Remove(TEntity entity) /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking for more information. + /// + /// See EF Core change tracking for more information. + /// /// /// The entity to update. /// @@ -335,21 +335,21 @@ public virtual void AddRange(params TEntity[] entities) => throw new NotSupportedException(); /// - /// - /// Begins tracking the given entities, and any other reachable entities that are - /// not already being tracked, in the state such that they will - /// be inserted into the database when is called. - /// + /// Begins tracking the given entities, and any other reachable entities that are + /// not already being tracked, in the state such that they will + /// be inserted into the database when is called. + /// + /// /// /// This method is async only to allow special value generators, such as the one used by /// 'Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy.SequenceHiLo', /// to access the database asynchronously. For all other cases the non async method should be used. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to add. /// A task that represents the asynchronous operation. @@ -357,11 +357,11 @@ public virtual Task AddRangeAsync(params TEntity[] entities) => throw new NotSupportedException(); /// - /// - /// Begins tracking the given entities and entries reachable from the given entities using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entities and entries reachable from the given entities using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -384,11 +384,11 @@ public virtual Task AddRangeAsync(params TEntity[] entities) /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to attach. public virtual void AttachRange(params TEntity[] entities) @@ -409,22 +409,22 @@ public virtual void AttachRange(params TEntity[] entities) /// they would be if was called before calling this method. /// This allows any cascading actions to be applied when is called. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to remove. public virtual void RemoveRange(params TEntity[] entities) => throw new NotSupportedException(); /// - /// - /// Begins tracking the given entities and entries reachable from the given entities using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entities and entries reachable from the given entities using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -447,11 +447,11 @@ public virtual void RemoveRange(params TEntity[] entities) /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to update. public virtual void UpdateRange(params TEntity[] entities) @@ -472,21 +472,21 @@ public virtual void AddRange(IEnumerable entities) => throw new NotSupportedException(); /// - /// - /// Begins tracking the given entities, and any other reachable entities that are - /// not already being tracked, in the state such that they will - /// be inserted into the database when is called. - /// + /// Begins tracking the given entities, and any other reachable entities that are + /// not already being tracked, in the state such that they will + /// be inserted into the database when is called. + /// + /// /// /// This method is async only to allow special value generators, such as the one used by /// 'Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy.SequenceHiLo', /// to access the database asynchronously. For all other cases the non async method should be used. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to add. /// A to observe while waiting for the task to complete. @@ -498,11 +498,11 @@ public virtual Task AddRangeAsync( => throw new NotSupportedException(); /// - /// - /// Begins tracking the given entities and entries reachable from the given entities using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entities and entries reachable from the given entities using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -525,11 +525,11 @@ public virtual Task AddRangeAsync( /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to attach. public virtual void AttachRange(IEnumerable entities) @@ -561,11 +561,11 @@ public virtual void RemoveRange(IEnumerable entities) => throw new NotSupportedException(); /// - /// - /// Begins tracking the given entities and entries reachable from the given entities using - /// the state by default, but see below for cases - /// when a different state will be used. - /// + /// Begins tracking the given entities and entries reachable from the given entities using + /// the state by default, but see below for cases + /// when a different state will be used. + /// + /// /// /// Generally, no database interaction will be performed until is called. /// @@ -588,11 +588,11 @@ public virtual void RemoveRange(IEnumerable entities) /// /// Use to set the state of only a single entity. /// - /// - /// - /// See EF Core change tracking - /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange - /// for more information. + /// + /// See EF Core change tracking + /// and Using AddRange, UpdateRange, AttachRange, and RemoveRange + /// for more information. + /// /// /// The entities to update. public virtual void UpdateRange(IEnumerable entities) @@ -662,25 +662,25 @@ IQueryProvider IQueryable.Provider => throw new NotSupportedException(); /// - /// - /// Gets the scoped being used to resolve services. - /// + /// Gets the scoped being used to resolve services. + /// + /// /// /// This property is intended for use by extension methods that need to make use of services /// not directly exposed in the public API surface. /// - /// - /// - /// See Accessing DbContext services for more information. + /// + /// See Accessing DbContext services for more information. + /// /// IServiceProvider IInfrastructure.Instance => throw new NotSupportedException(); /// - /// - /// This method is called by data binding frameworks when attempting to data bind - /// directly to a . - /// + /// This method is called by data binding frameworks when attempting to data bind + /// directly to a . + /// + /// /// /// This implementation always throws an exception as binding directly to a /// will result in a query being @@ -691,9 +691,9 @@ IServiceProvider IInfrastructure.Instance /// for WPF binding, or /// for WinForms. /// - /// - /// - /// See Local views of tracked entities in EF Core for more information. + /// + /// See Local views of tracked entities in EF Core for more information. + /// /// /// Always thrown. /// Never returns, always throws an exception. diff --git a/src/EFCore/DeleteBehavior.cs b/src/EFCore/DeleteBehavior.cs index ab7c5810270..01d002c1e9d 100644 --- a/src/EFCore/DeleteBehavior.cs +++ b/src/EFCore/DeleteBehavior.cs @@ -6,10 +6,10 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// Indicates how a delete operation is applied to dependent entities in a relationship when the - /// principal is deleted or the relationship is severed. - /// + /// Indicates how a delete operation is applied to dependent entities in a relationship when the + /// principal is deleted or the relationship is severed. + /// + /// /// /// Behaviors in the database are dependent on the database schema being created /// appropriately. Using Entity Framework Migrations or @@ -19,20 +19,20 @@ namespace Microsoft.EntityFrameworkCore /// Note that the in-memory behavior for entities that are currently tracked by /// the can be different from the behavior that happens in the database. /// - /// - /// - /// See Cascade delete and deleting orphans in EF Core for more information. + /// + /// See Cascade delete and deleting orphans in EF Core for more information. + /// /// public enum DeleteBehavior { /// - /// - /// For entities being tracked by the , the values of foreign key properties in - /// dependent entities are set to null when the related principal is deleted. - /// This helps keep the graph of entities in a consistent state while they are being tracked, such that a - /// fully consistent graph can then be written to the database. If a property cannot be set to null because - /// it is not a nullable type, then an exception will be thrown when is called. - /// + /// For entities being tracked by the , the values of foreign key properties in + /// dependent entities are set to null when the related principal is deleted. + /// This helps keep the graph of entities in a consistent state while they are being tracked, such that a + /// fully consistent graph can then be written to the database. If a property cannot be set to null because + /// it is not a nullable type, then an exception will be thrown when is called. + /// + /// /// /// If the database has been created from the model using Entity Framework Migrations or the /// method, then the behavior in the database @@ -42,49 +42,45 @@ public enum DeleteBehavior /// This is the default for optional relationships. That is, for relationships that have /// nullable foreign keys. /// - /// + /// ClientSetNull, /// - /// - /// For entities being tracked by the , the values of foreign key properties in - /// dependent entities are set to null when the related principal is deleted. - /// This helps keep the graph of entities in a consistent state while they are being tracked, such that a - /// fully consistent graph can then be written to the database. If a property cannot be set to null because - /// it is not a nullable type, then an exception will be thrown when is called. - /// - /// - /// If the database has been created from the model using Entity Framework Migrations or the - /// method, then the behavior in the database - /// is to generate an error if a foreign key constraint is violated. - /// + /// For entities being tracked by the , the values of foreign key properties in + /// dependent entities are set to null when the related principal is deleted. + /// This helps keep the graph of entities in a consistent state while they are being tracked, such that a + /// fully consistent graph can then be written to the database. If a property cannot be set to null because + /// it is not a nullable type, then an exception will be thrown when is called. /// + /// + /// If the database has been created from the model using Entity Framework Migrations or the + /// method, then the behavior in the database + /// is to generate an error if a foreign key constraint is violated. + /// Restrict, /// - /// - /// For entities being tracked by the , the values of foreign key properties in - /// dependent entities are set to null when the related principal is deleted. - /// This helps keep the graph of entities in a consistent state while they are being tracked, such that a - /// fully consistent graph can then be written to the database. If a property cannot be set to null because - /// it is not a nullable type, then an exception will be thrown when is called. - /// - /// - /// If the database has been created from the model using Entity Framework Migrations or the - /// method, then the behavior in the database is - /// the same as is described above for tracked entities. Keep in mind that some databases cannot easily - /// support this behavior, especially if there are cycles in relationships, in which case it may - /// be better to use which will allow EF to cascade null values - /// on loaded entities even if the database does not support this. - /// + /// For entities being tracked by the , the values of foreign key properties in + /// dependent entities are set to null when the related principal is deleted. + /// This helps keep the graph of entities in a consistent state while they are being tracked, such that a + /// fully consistent graph can then be written to the database. If a property cannot be set to null because + /// it is not a nullable type, then an exception will be thrown when is called. /// + /// + /// If the database has been created from the model using Entity Framework Migrations or the + /// method, then the behavior in the database is + /// the same as is described above for tracked entities. Keep in mind that some databases cannot easily + /// support this behavior, especially if there are cycles in relationships, in which case it may + /// be better to use which will allow EF to cascade null values + /// on loaded entities even if the database does not support this. + /// SetNull, /// - /// - /// For entities being tracked by the , dependent entities - /// will be deleted when the related principal is deleted. - /// + /// For entities being tracked by the , dependent entities + /// will be deleted when the related principal is deleted. + /// + /// /// /// If the database has been created from the model using Entity Framework Migrations or the /// method, then the behavior in the database is @@ -97,43 +93,39 @@ public enum DeleteBehavior /// This is the default for required relationships. That is, for relationships that have /// non-nullable foreign keys. /// - /// + /// Cascade, /// - /// - /// For entities being tracked by the , dependent entities - /// will be deleted when the related principal is deleted. - /// - /// - /// If the database has been created from the model using Entity Framework Migrations or the - /// method, then the behavior in the database - /// is to generate an error if a foreign key constraint is violated. - /// + /// For entities being tracked by the , dependent entities + /// will be deleted when the related principal is deleted. /// + /// + /// If the database has been created from the model using Entity Framework Migrations or the + /// method, then the behavior in the database + /// is to generate an error if a foreign key constraint is violated. + /// ClientCascade, /// - /// - /// For entities being tracked by the , the values of foreign key properties in - /// dependent entities are set to null when the related principal is deleted. - /// This helps keep the graph of entities in a consistent state while they are being tracked, such that a - /// fully consistent graph can then be written to the database. If a property cannot be set to null because - /// it is not a nullable type, then an exception will be thrown when is called. - /// - /// - /// If the database has been created from the model using Entity Framework Migrations or the - /// method, then the behavior in the database - /// is to generate an error if a foreign key constraint is violated. - /// + /// For entities being tracked by the , the values of foreign key properties in + /// dependent entities are set to null when the related principal is deleted. + /// This helps keep the graph of entities in a consistent state while they are being tracked, such that a + /// fully consistent graph can then be written to the database. If a property cannot be set to null because + /// it is not a nullable type, then an exception will be thrown when is called. /// + /// + /// If the database has been created from the model using Entity Framework Migrations or the + /// method, then the behavior in the database + /// is to generate an error if a foreign key constraint is violated. + /// NoAction, /// - /// - /// Note: it is unusual to use this value. Consider using instead to match - /// the behavior of EF6 with cascading deletes disabled. - /// + /// Note: it is unusual to use this value. Consider using instead to match + /// the behavior of EF6 with cascading deletes disabled. + /// + /// /// /// For entities being tracked by the , the values of foreign key properties in /// dependent entities are not changed when the related principal entity is deleted. @@ -145,7 +137,7 @@ public enum DeleteBehavior /// method, then the behavior in the database /// is to generate an error if a foreign key constraint is violated. /// - /// + /// ClientNoAction } } diff --git a/src/EFCore/Design/EntityFrameworkDesignServicesBuilder.cs b/src/EFCore/Design/EntityFrameworkDesignServicesBuilder.cs index 609c78d46b1..3d50d6fd497 100644 --- a/src/EFCore/Design/EntityFrameworkDesignServicesBuilder.cs +++ b/src/EFCore/Design/EntityFrameworkDesignServicesBuilder.cs @@ -12,9 +12,9 @@ namespace Microsoft.EntityFrameworkCore.Design { /// - /// - /// A builder API designed for database providers to use when implementing . - /// + /// A builder API designed for database providers to use when implementing . + /// + /// /// /// Providers should create an instance of this class, use its methods to register /// services, and then call to fill out the remaining Entity @@ -25,25 +25,23 @@ namespace Microsoft.EntityFrameworkCore.Design /// may register a service with a different scope, but great care must be taken that all its dependencies /// can handle the new scope, and that it does not cause issue for services that depend on it. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class EntityFrameworkDesignServicesBuilder : EntityFrameworkServicesBuilder { /// - /// - /// 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. - /// - /// - /// This dictionary is exposed for testing and provider-validation only. - /// It should not be used from application code. - /// + /// 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. /// + /// + /// This dictionary is exposed for testing and provider-validation only. + /// It should not be used from application code. + /// [EntityFrameworkInternal] public static readonly IDictionary Services = new Dictionary diff --git a/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGenerator.cs b/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGenerator.cs index b14e53aa555..77f8c9739c1 100644 --- a/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGenerator.cs +++ b/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGenerator.cs @@ -11,9 +11,7 @@ namespace Microsoft.EntityFrameworkCore.Design.Internal { /// - /// - /// Base class to be used by database providers when implementing an - /// + /// Base class to be used by database providers when implementing an /// public class CSharpRuntimeAnnotationCodeGenerator : ICSharpRuntimeAnnotationCodeGenerator { diff --git a/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGeneratorDependencies.cs b/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGeneratorDependencies.cs index d2c13395432..1ee370d4962 100644 --- a/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGeneratorDependencies.cs +++ b/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGeneratorDependencies.cs @@ -14,36 +14,31 @@ namespace Microsoft.EntityFrameworkCore.Design.Internal /// 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. - /// /// + /// + /// 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. + /// public sealed record CSharpRuntimeAnnotationCodeGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public CSharpRuntimeAnnotationCodeGeneratorDependencies(ICSharpHelper cSharpHelper) { diff --git a/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGeneratorParameters.cs b/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGeneratorParameters.cs index 293a6922f48..6ee37b890a7 100644 --- a/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGeneratorParameters.cs +++ b/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGeneratorParameters.cs @@ -12,20 +12,19 @@ namespace Microsoft.EntityFrameworkCore.Design.Internal public sealed record CSharpRuntimeAnnotationCodeGeneratorParameters { /// - /// - /// Creates the parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it may change - /// as new parameters are added. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public CSharpRuntimeAnnotationCodeGeneratorParameters( string targetName, diff --git a/src/EFCore/Diagnostics/CoreEventId.cs b/src/EFCore/Diagnostics/CoreEventId.cs index 29afbccd3fa..bc2522c815a 100644 --- a/src/EFCore/Diagnostics/CoreEventId.cs +++ b/src/EFCore/Diagnostics/CoreEventId.cs @@ -12,17 +12,17 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Event IDs for events that correspond to messages logged to an - /// and events sent to a . - /// + /// Event IDs for events that correspond to messages logged to an + /// and events sent to a . + /// + /// /// /// These IDs are also used with to configure the /// behavior of warnings. /// - /// - /// - /// See Logging, events, and diagnostics for more information. + /// + /// See Logging, events, and diagnostics for more information. + /// /// public static class CoreEventId { @@ -138,16 +138,16 @@ private static EventId MakeUpdateId(Id id) => new((int)id, _updatePrefix + id); /// - /// - /// An error occurred while attempting to save changes to the database. - /// + /// An error occurred while attempting to save changes to the database. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId SaveChangesFailed = MakeUpdateId(Id.SaveChangesFailed); /// @@ -163,147 +163,141 @@ private static EventId MakeQueryId(Id id) => new((int)id, _queryPrefix + id); /// - /// - /// An error occurred while processing the results of a query. - /// + /// An error occurred while processing the results of a query. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId QueryIterationFailed = MakeQueryId(Id.QueryIterationFailed); /// - /// - /// A query is planned for execution. - /// + /// A query is planned for execution. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId QueryExecutionPlanned = MakeQueryId(Id.QueryExecutionPlanned); /// - /// - /// Possible unintended comparison of collection navigation to null. - /// + /// Possible unintended comparison of collection navigation to null. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId PossibleUnintendedCollectionNavigationNullComparisonWarning = MakeQueryId(Id.PossibleUnintendedCollectionNavigationNullComparisonWarning); /// - /// - /// Possible unintended reference comparison. - /// + /// Possible unintended reference comparison. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId PossibleUnintendedReferenceComparisonWarning = MakeQueryId(Id.PossibleUnintendedReferenceComparisonWarning); /// - /// - /// Invalid include path '{navigationChain}', couldn't find navigation for '{navigationName}'. - /// + /// Invalid include path '{navigationChain}', couldn't find navigation for '{navigationName}'. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId InvalidIncludePathError = MakeQueryId(Id.InvalidIncludePathError); /// - /// - /// Starting query compilation. - /// + /// Starting query compilation. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId QueryCompilationStarting = MakeQueryId(Id.QueryCompilationStarting); /// - /// - /// A navigation base was included in the query. - /// + /// A navigation base was included in the query. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId NavigationBaseIncluded = MakeQueryId(Id.NavigationBaseIncluded); /// - /// - /// A navigation base specific in Include in the query was ignored because it will be populated already due to fix-up. - /// + /// A navigation base specific in Include in the query was ignored because it will be populated already due to fix-up. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId NavigationBaseIncludeIgnored = MakeQueryId(Id.NavigationBaseIncludeIgnored); /// - /// - /// A query uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. - /// - /// - /// This event is in the category. - /// + /// A query uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results. /// + /// + /// This event is in the category. + /// public static readonly EventId RowLimitingOperationWithoutOrderByWarning = MakeQueryId(Id.RowLimitingOperationWithoutOrderByWarning); /// - /// - /// A query uses First/FirstOrDefault operation without OrderBy and filter which may lead to unpredictable results. - /// - /// - /// This event is in the category. - /// + /// A query uses First/FirstOrDefault operation without OrderBy and filter which may lead to unpredictable results. /// + /// + /// This event is in the category. + /// public static readonly EventId FirstWithoutOrderByAndFilterWarning = MakeQueryId(Id.FirstWithoutOrderByAndFilterWarning); /// - /// - /// The query uses the 'Distinct' operator after applying an ordering. If there are any row limiting operation used before `Distinct` - /// and after ordering then ordering will be used for it. - /// Ordering(s) will be erased after `Distinct` and results afterwards would be unordered. - /// - /// - /// This event is in the category. - /// + /// The query uses the 'Distinct' operator after applying an ordering. If there are any row limiting operation used before `Distinct` + /// and after ordering then ordering will be used for it. + /// Ordering(s) will be erased after `Distinct` and results afterwards would be unordered. /// + /// + /// This event is in the category. + /// public static readonly EventId DistinctAfterOrderByWithoutRowLimitingOperatorWarning = MakeQueryId(Id.DistinctAfterOrderByWithoutRowLimitingOperatorWarning); @@ -313,146 +307,146 @@ private static EventId MakeInfraId(Id id) => new((int)id, _infraPrefix + id); /// - /// - /// A warning indicating that sensitive data logging is enabled and may be logged. - /// + /// A warning indicating that sensitive data logging is enabled and may be logged. + /// + /// /// /// This event may be in different categories depending on where sensitive data is being logged. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId SensitiveDataLoggingEnabledWarning = MakeInfraId(Id.SensitiveDataLoggingEnabledWarning); /// - /// - /// A service provider was created for internal use by Entity Framework. - /// + /// A service provider was created for internal use by Entity Framework. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ServiceProviderCreated = MakeInfraId(Id.ServiceProviderCreated); /// - /// - /// Many service providers were created in a single app domain. - /// + /// Many service providers were created in a single app domain. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ManyServiceProvidersCreatedWarning = MakeInfraId(Id.ManyServiceProvidersCreatedWarning); /// - /// - /// A was initialized. - /// + /// A was initialized. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ContextInitialized = MakeInfraId(Id.ContextInitialized); /// - /// - /// Provides debug information for why a new internal service provider was created. - /// + /// Provides debug information for why a new internal service provider was created. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ServiceProviderDebugInfo = MakeInfraId(Id.ServiceProviderDebugInfo); /// - /// - /// A transient exception has been encountered during execution and the operation will be retried. - /// + /// A transient exception has been encountered during execution and the operation will be retried. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ExecutionStrategyRetrying = MakeInfraId(Id.ExecutionStrategyRetrying); /// - /// - /// A navigation property is being lazy-loaded. - /// + /// A navigation property is being lazy-loaded. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId NavigationLazyLoading = MakeInfraId(Id.NavigationLazyLoading); /// - /// - /// An attempt was made to lazy-load a property after the DbContext had been disposed. - /// + /// An attempt was made to lazy-load a property after the DbContext had been disposed. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId LazyLoadOnDisposedContextWarning = MakeInfraId(Id.LazyLoadOnDisposedContextWarning); /// - /// - /// An attempt was made to lazy-load a property from a detached/no-tracking entity. - /// + /// An attempt was made to lazy-load a property from a detached/no-tracking entity. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId DetachedLazyLoadingWarning = MakeInfraId(Id.DetachedLazyLoadingWarning); /// - /// - /// 'AddEntityFramework*' was called on the service provider, but 'UseInternalServiceProvider' wasn't. - /// + /// 'AddEntityFramework*' was called on the service provider, but 'UseInternalServiceProvider' wasn't. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId RedundantAddServicesCallWarning = MakeInfraId(Id.RedundantAddServicesCallWarning); /// - /// - /// The model supplied in the context options was created with an older EF Core version. - /// + /// The model supplied in the context options was created with an older EF Core version. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId OldModelVersionWarning = MakeInfraId(Id.OldModelVersionWarning); private static readonly string _modelPrefix = DbLoggerCategory.Model.Name + "."; @@ -466,38 +460,38 @@ private static EventId MakeModelValidationId(Id id) => new((int)id, _modelValidationPrefix + id); /// - /// - /// A shadow property has been created. - /// + /// A shadow property has been created. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ShadowPropertyCreated = MakeModelValidationId(Id.ShadowPropertyCreated); /// - /// - /// A foreign key property was created in shadow state because a conflicting property with the simple name for - /// this foreign key exists in the entity type, but is either not mapped, is already used for another relationship, - /// or is incompatible with the associated primary key type. See https://aka.ms/efcore-relationships for information - /// on mapping relationships in EF Core. - /// + /// A foreign key property was created in shadow state because a conflicting property with the simple name for + /// this foreign key exists in the entity type, but is either not mapped, is already used for another relationship, + /// or is incompatible with the associated primary key type. See https://aka.ms/efcore-relationships for information + /// on mapping relationships in EF Core. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ShadowForeignKeyPropertyCreated = MakeModelValidationId(Id.ShadowForeignKeyPropertyCreated); /// - /// - /// An index was not created as the properties are already covered. - /// + /// An index was not created as the properties are already covered. + /// + /// /// /// This event is in the category. /// @@ -505,13 +499,13 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId RedundantIndexRemoved = MakeModelId(Id.RedundantIndexRemoved); /// - /// - /// The best match for foreign key properties are incompatible with the principal key. - /// + /// The best match for foreign key properties are incompatible with the principal key. + /// + /// /// /// This event is in the category. /// @@ -519,13 +513,13 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId IncompatibleMatchingForeignKeyProperties = MakeModelId(Id.IncompatibleMatchingForeignKeyProperties); /// - /// - /// Foreign key configured as required before the dependent end was determined. - /// + /// Foreign key configured as required before the dependent end was determined. + /// + /// /// /// This event is in the category. /// @@ -533,139 +527,139 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId AmbiguousEndRequiredWarning = MakeModelId(Id.AmbiguousEndRequiredWarning); /// - /// - /// The entity type with the navigation property that has the - /// was configured as the dependent side in the relationship. - /// + /// The entity type with the navigation property that has the + /// was configured as the dependent side in the relationship. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// [Obsolete] public static readonly EventId RequiredAttributeInverted = MakeModelId(Id.Obsolete_RequiredAttributeInverted); /// - /// - /// The entity type with the navigation property that has non-nullability - /// was configured as the dependent side in the relationship. - /// + /// The entity type with the navigation property that has non-nullability + /// was configured as the dependent side in the relationship. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// [Obsolete] public static readonly EventId NonNullableInverted = MakeModelId(Id.Obsolete_NonNullableInverted); /// - /// - /// Navigations separated into two relationships as was specified on both navigations. - /// + /// Navigations separated into two relationships as was specified on both navigations. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// [Obsolete] public static readonly EventId RequiredAttributeOnBothNavigations = MakeModelId(Id.Obsolete_RequiredAttributeOnBothNavigations); /// - /// - /// Navigations separated into two relationships as non-nullability was specified on both navigations. - /// + /// Navigations separated into two relationships as non-nullability was specified on both navigations. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// [Obsolete] public static readonly EventId NonNullableReferenceOnBothNavigations = MakeModelId(Id.Obsolete_NonNullableReferenceOnBothNavigations); /// - /// - /// The on the navigation property to the dependent entity was ignored. - /// + /// The on the navigation property to the dependent entity was ignored. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// [Obsolete] public static readonly EventId RequiredAttributeOnDependent = MakeModelId(Id.Obsolete_RequiredAttributeOnDependent); /// - /// - /// The non-nullability of the navigation property to the dependent entity was ignored. - /// + /// The non-nullability of the navigation property to the dependent entity was ignored. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// [Obsolete] public static readonly EventId NonNullableReferenceOnDependent = MakeModelId(Id.Obsolete_NonNullableReferenceOnDependent); /// - /// - /// The on the collection navigation property was ignored. - /// + /// The on the collection navigation property was ignored. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId RequiredAttributeOnCollection = MakeModelId(Id.RequiredAttributeOnCollection); /// - /// - /// The on the skip navigation property was ignored. - /// + /// The on the skip navigation property was ignored. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId RequiredAttributeOnSkipNavigation = MakeModelId(Id.RequiredAttributeOnSkipNavigation); /// - /// - /// The properties that best match the foreign key convention are already used by a different foreign key. - /// + /// The properties that best match the foreign key convention are already used by a different foreign key. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId ConflictingShadowForeignKeysWarning = MakeModelId(Id.ConflictingShadowForeignKeysWarning); /// - /// - /// There are multiple properties that could be used as the primary key. - /// + /// There are multiple properties that could be used as the primary key. + /// + /// /// /// This event is in the category. /// @@ -673,13 +667,13 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId MultiplePrimaryKeyCandidates = MakeModelId(Id.MultiplePrimaryKeyCandidates); /// - /// - /// There are multiple properties that could be navigations to the same type. - /// + /// There are multiple properties that could be navigations to the same type. + /// + /// /// /// This event is in the category. /// @@ -687,14 +681,14 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId MultipleNavigationProperties = MakeModelId(Id.MultipleNavigationProperties); /// - /// - /// There are multiple navigations with that point - /// to the same inverse navigation. - /// + /// There are multiple navigations with that point + /// to the same inverse navigation. + /// + /// /// /// This event is in the category. /// @@ -702,14 +696,14 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId MultipleInversePropertiesSameTargetWarning = MakeModelId(Id.MultipleInversePropertiesSameTargetWarning); /// - /// - /// The navigation that points to is not the defining navigation. - /// + /// The navigation that points to is not the defining navigation. + /// + /// /// /// This event is in the category. /// @@ -717,13 +711,13 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId NonDefiningInverseNavigationWarning = MakeModelId(Id.NonDefiningInverseNavigationWarning); /// - /// - /// The navigation that points to is not the defining navigation. - /// + /// The navigation that points to is not the defining navigation. + /// + /// /// /// This event is in the category. /// @@ -731,14 +725,14 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId NonOwnershipInverseNavigationWarning = MakeModelId(Id.NonOwnershipInverseNavigationWarning); /// - /// - /// Navigations separated into two relationships as was specified on properties - /// on both sides. - /// + /// Navigations separated into two relationships as was specified on properties + /// on both sides. + /// + /// /// /// This event is in the category. /// @@ -746,15 +740,15 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId ForeignKeyAttributesOnBothPropertiesWarning = MakeModelId(Id.ForeignKeyAttributesOnBothPropertiesWarning); /// - /// - /// Navigations separated into two relationships as was specified on navigations - /// on both sides. - /// + /// Navigations separated into two relationships as was specified on navigations + /// on both sides. + /// + /// /// /// This event is in the category. /// @@ -762,15 +756,15 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId ForeignKeyAttributesOnBothNavigationsWarning = MakeModelId(Id.ForeignKeyAttributesOnBothNavigationsWarning); /// - /// - /// The specified on the navigation doesn't match the - /// specified on the property. - /// + /// The specified on the navigation doesn't match the + /// specified on the property. + /// + /// /// /// This event is in the category. /// @@ -778,14 +772,14 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning = MakeModelId(Id.ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning); /// - /// - /// The configured is redundant. - /// + /// The configured is redundant. + /// + /// /// /// This event is in the category. /// @@ -793,14 +787,14 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId RedundantForeignKeyWarning = MakeModelValidationId(Id.RedundantForeignKeyWarning); /// - /// - /// A attribute on the entity type is conflicting - /// with a attribute on at least one of its properties. - /// + /// A attribute on the entity type is conflicting + /// with a attribute on at least one of its properties. + /// + /// /// /// This event is in the category. /// @@ -808,15 +802,15 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId ConflictingKeylessAndKeyAttributesWarning = MakeModelId(Id.ConflictingKeylessAndKeyAttributesWarning); /// - /// - /// Required navigation with principal entity having global query filter defined - /// and the declaring entity not having a matching filter - /// + /// Required navigation with principal entity having global query filter defined + /// and the declaring entity not having a matching filter + /// + /// /// /// This event is in the category. /// @@ -824,7 +818,7 @@ private static EventId MakeModelValidationId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId PossibleIncorrectRequiredNavigationWithQueryFilterInteractionWarning = MakeModelValidationId(Id.PossibleIncorrectRequiredNavigationWithQueryFilterInteractionWarning); @@ -834,9 +828,9 @@ private static EventId MakeChangeTrackingId(Id id) => new((int)id, _changeTrackingPrefix + id); /// - /// - /// DetectChanges is starting. - /// + /// DetectChanges is starting. + /// + /// /// /// This event is in the category. /// @@ -844,13 +838,13 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId DetectChangesStarting = MakeChangeTrackingId(Id.DetectChangesStarting); /// - /// - /// DetectChanges has completed. - /// + /// DetectChanges has completed. + /// + /// /// /// This event is in the category. /// @@ -858,13 +852,13 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId DetectChangesCompleted = MakeChangeTrackingId(Id.DetectChangesCompleted); /// - /// - /// DetectChanges has detected a change in a property value. - /// + /// DetectChanges has detected a change in a property value. + /// + /// /// /// This event is in the category. /// @@ -872,13 +866,13 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId PropertyChangeDetected = MakeChangeTrackingId(Id.PropertyChangeDetected); /// - /// - /// DetectChanges has detected a change in a foreign key property value. - /// + /// DetectChanges has detected a change in a foreign key property value. + /// + /// /// /// This event is in the category. /// @@ -886,14 +880,14 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId ForeignKeyChangeDetected = MakeChangeTrackingId(Id.ForeignKeyChangeDetected); /// - /// - /// DetectChanges has detected entities were added and/or removed from a collection - /// navigation property. - /// + /// DetectChanges has detected entities were added and/or removed from a collection + /// navigation property. + /// + /// /// /// This event is in the category. /// @@ -901,13 +895,13 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId CollectionChangeDetected = MakeChangeTrackingId(Id.CollectionChangeDetected); /// - /// - /// DetectChanges has detected entities were added and/or removed from a collection skip navigation property. - /// + /// DetectChanges has detected entities were added and/or removed from a collection skip navigation property. + /// + /// /// /// This event is in the category. /// @@ -915,13 +909,13 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId SkipCollectionChangeDetected = MakeChangeTrackingId(Id.SkipCollectionChangeDetected); /// - /// - /// DetectChanges has detected a change to the entity references by another entity. - /// + /// DetectChanges has detected a change to the entity references by another entity. + /// + /// /// /// This event is in the category. /// @@ -929,13 +923,13 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId ReferenceChangeDetected = MakeChangeTrackingId(Id.ReferenceChangeDetected); /// - /// - /// An entity is being tracked by the . - /// + /// An entity is being tracked by the . + /// + /// /// /// This event is in the category. /// @@ -943,14 +937,14 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId StartedTracking = MakeChangeTrackingId(Id.StartedTracking); /// - /// - /// An entity tracked by the is changing from one - /// to another. - /// + /// An entity tracked by the is changing from one + /// to another. + /// + /// /// /// This event is in the category. /// @@ -958,13 +952,13 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId StateChanged = MakeChangeTrackingId(Id.StateChanged); /// - /// - /// A property of a tracked entity is getting a generated value. - /// + /// A property of a tracked entity is getting a generated value. + /// + /// /// /// This event is in the category. /// @@ -972,13 +966,13 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId ValueGenerated = MakeChangeTrackingId(Id.ValueGenerated); /// - /// - /// An entity is being deleted or detached because its parent was deleted. - /// + /// An entity is being deleted or detached because its parent was deleted. + /// + /// /// /// This event is in the category. /// @@ -986,14 +980,14 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId CascadeDelete = MakeUpdateId(Id.CascadeDelete); /// - /// - /// An entity is being deleted or detached because the required relationship to its - /// parent was severed. - /// + /// An entity is being deleted or detached because the required relationship to its + /// parent was severed. + /// + /// /// /// This event is in the category. /// @@ -1001,13 +995,13 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId CascadeDeleteOrphan = MakeUpdateId(Id.CascadeDeleteOrphan); /// - /// - /// or one of its overloads started. - /// + /// or one of its overloads started. + /// + /// /// /// This event is in the category. /// @@ -1015,13 +1009,13 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId SaveChangesStarting = MakeUpdateId(Id.SaveChangesStarting); /// - /// - /// or one of its overloads has completed. - /// + /// or one of its overloads has completed. + /// + /// /// /// This event is in the category. /// @@ -1029,14 +1023,14 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId SaveChangesCompleted = MakeUpdateId(Id.SaveChangesCompleted); /// - /// - /// An was thrown during the call to - /// - /// + /// An was thrown during the call to + /// + /// + /// /// /// This event is in the category. /// @@ -1044,13 +1038,13 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId OptimisticConcurrencyException = MakeUpdateId(Id.OptimisticConcurrencyException); /// - /// - /// The is being disposed. - /// + /// The is being disposed. + /// + /// /// /// This event is in the category. /// @@ -1058,20 +1052,20 @@ private static EventId MakeChangeTrackingId(Id id) /// This event uses the payload when used with a /// . /// - /// + /// public static readonly EventId ContextDisposed = MakeInfraId(Id.ContextDisposed); /// - /// - /// A property has a collection or enumeration type with a value converter but with no value comparer. - /// + /// A property has a collection or enumeration type with a value converter but with no value comparer. + /// + /// /// /// This event is in the category. /// /// /// This event uses the payload when used with a . /// - /// + /// public static readonly EventId CollectionWithoutComparer = MakeModelValidationId(Id.CollectionWithoutComparer); } } diff --git a/src/EFCore/Diagnostics/DbContextLoggerOptions.cs b/src/EFCore/Diagnostics/DbContextLoggerOptions.cs index 9e1f2ce647b..5bed700909b 100644 --- a/src/EFCore/Diagnostics/DbContextLoggerOptions.cs +++ b/src/EFCore/Diagnostics/DbContextLoggerOptions.cs @@ -54,24 +54,20 @@ public enum DbContextLoggerOptions LocalTime = 1 << 5, /// - /// - /// The default used by . - /// - /// - /// Includes , , , . - /// + /// The default used by . /// + /// + /// Includes , , , . + /// DefaultWithLocalTime = Level | Category | Id | LocalTime, /// - /// - /// The same defaults as used by , - /// but with UTC timestamps. - /// - /// - /// Includes , , , . - /// + /// The same defaults as used by , + /// but with UTC timestamps. /// + /// + /// Includes , , , . + /// DefaultWithUtcTime = Level | Category | Id | UtcTime } } diff --git a/src/EFCore/Diagnostics/IDbContextLogger.cs b/src/EFCore/Diagnostics/IDbContextLogger.cs index 4108cc7e0f4..6f383ab77a1 100644 --- a/src/EFCore/Diagnostics/IDbContextLogger.cs +++ b/src/EFCore/Diagnostics/IDbContextLogger.cs @@ -16,9 +16,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics public interface IDbContextLogger { /// - /// - /// Logs the given . - /// + /// Logs the given . + /// + /// /// /// This method is only called if returns true. /// @@ -26,7 +26,7 @@ public interface IDbContextLogger /// The specific subtype of the argument is dependent on the event /// being logged. See for the type of event data used for each core event. /// - /// + /// /// The event to log. void Log(EventData eventData); diff --git a/src/EFCore/Diagnostics/IDiagnosticsLogger.cs b/src/EFCore/Diagnostics/IDiagnosticsLogger.cs index 80c0b7423c6..789f6db23d0 100644 --- a/src/EFCore/Diagnostics/IDiagnosticsLogger.cs +++ b/src/EFCore/Diagnostics/IDiagnosticsLogger.cs @@ -9,20 +9,20 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Combines and - /// for use by all EF Core logging so that events can be sent to both - /// for ASP.NET and for everything else. - /// + /// Combines and + /// for use by all EF Core logging so that events can be sent to both + /// for ASP.NET and for everything else. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IDiagnosticsLogger { diff --git a/src/EFCore/Diagnostics/IDiagnosticsLogger`.cs b/src/EFCore/Diagnostics/IDiagnosticsLogger`.cs index 5ced2e01a4c..1d45ce87e4b 100644 --- a/src/EFCore/Diagnostics/IDiagnosticsLogger`.cs +++ b/src/EFCore/Diagnostics/IDiagnosticsLogger`.cs @@ -8,14 +8,13 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// + /// Combines and + /// for use by all EF Core logging so that events can be sent to both + /// for ASP.NET and for everything else. + /// + /// /// - /// Combines and - /// for use by all EF Core logging so that events can be sent to both - /// for ASP.NET and for everything else. - /// - /// - /// Also intercepts messages such that warnings - /// can be either logged or thrown, and such that a decision as to whether to log + /// Also intercepts messages such that warnings can be either logged or thrown, and such that a decision as to whether to log /// sensitive data or not can be made. /// /// @@ -24,10 +23,10 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IDiagnosticsLogger : IDiagnosticsLogger where TLoggerCategory : LoggerCategory, new() diff --git a/src/EFCore/Diagnostics/IInterceptor.cs b/src/EFCore/Diagnostics/IInterceptor.cs index aa268ee90d5..f20f667f3a2 100644 --- a/src/EFCore/Diagnostics/IInterceptor.cs +++ b/src/EFCore/Diagnostics/IInterceptor.cs @@ -4,9 +4,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// The base interface for all Entity Framework interceptors. - /// + /// The base interface for all Entity Framework interceptors. + /// + /// /// /// Interceptors can be used to view, change, or suppress operations taken by Entity Framework. /// See the specific implementations of this interface for details. For example, 'IDbCommandInterceptor'. @@ -21,9 +21,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics /// order that they are resolved from the service provider, and then the application interceptors are run /// in the order that they were added to the context. /// - /// - /// - /// See EF Core interceptors for more information. + /// + /// See EF Core interceptors for more information. + /// /// public interface IInterceptor { diff --git a/src/EFCore/Diagnostics/IInterceptorAggregator.cs b/src/EFCore/Diagnostics/IInterceptorAggregator.cs index 4e0b64aa919..93d45a1feed 100644 --- a/src/EFCore/Diagnostics/IInterceptorAggregator.cs +++ b/src/EFCore/Diagnostics/IInterceptorAggregator.cs @@ -15,13 +15,15 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// Instances should be registered on the internal service provider as multiple /// interfaces. /// - /// - /// - /// See EF Core interceptors for more information. + /// + /// See EF Core interceptors for more information. + /// /// public interface IInterceptorAggregator { @@ -31,10 +33,8 @@ public interface IInterceptorAggregator Type InterceptorType { get; } /// - /// - /// Resolves a single /> from all those registered on - /// the or in the internal service provider. - /// + /// Resolves a single /> from all those registered on + /// the or in the internal service provider. /// /// The interceptors to combine. /// The combined interceptor. diff --git a/src/EFCore/Diagnostics/IInterceptors.cs b/src/EFCore/Diagnostics/IInterceptors.cs index 28def66570b..bf0dd0b1075 100644 --- a/src/EFCore/Diagnostics/IInterceptors.cs +++ b/src/EFCore/Diagnostics/IInterceptors.cs @@ -14,15 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See EF Core interceptors for more information. + /// + /// See EF Core interceptors for more information. + /// /// public interface IInterceptors { diff --git a/src/EFCore/Diagnostics/ILoggingOptions.cs b/src/EFCore/Diagnostics/ILoggingOptions.cs index e824548f8a4..be1a6e55413 100644 --- a/src/EFCore/Diagnostics/ILoggingOptions.cs +++ b/src/EFCore/Diagnostics/ILoggingOptions.cs @@ -8,18 +8,18 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Options set at the singleton level to control how - /// messages are logged and/or thrown in exceptions. - /// + /// Options set at the singleton level to control how + /// messages are logged and/or thrown in exceptions. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Logging, events, and diagnostics for more information. + /// + /// See Logging, events, and diagnostics for more information. + /// /// public interface ILoggingOptions : ISingletonOptions { diff --git a/src/EFCore/Diagnostics/ISaveChangesInterceptor.cs b/src/EFCore/Diagnostics/ISaveChangesInterceptor.cs index 111f972fbc2..e5195c09b2c 100644 --- a/src/EFCore/Diagnostics/ISaveChangesInterceptor.cs +++ b/src/EFCore/Diagnostics/ISaveChangesInterceptor.cs @@ -8,9 +8,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Allows interception of the and methods. - /// + /// Allows interception of the and methods. + /// + /// /// /// Command interceptors can be used to view, change, or suppress execution of the SaveChanges call and /// modify the result before it is returned to EF. @@ -27,9 +27,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics /// If both injected and application interceptors are found, then the injected interceptors are run in the /// order that they are resolved from the service provider, and then the application interceptors are run last. /// - /// - /// - /// See EF Core interceptors for more information. + /// + /// See EF Core interceptors for more information. + /// /// public interface ISaveChangesInterceptor : IInterceptor { @@ -55,14 +55,12 @@ InterceptionResult SavingChanges( InterceptionResult result); /// - /// - /// Called at the end of . - /// - /// - /// This method is still called if an interceptor suppressed creation of a command in . - /// In this case, is the result returned by . - /// + /// Called at the end of . /// + /// + /// This method is still called if an interceptor suppressed creation of a command in . + /// In this case, is the result returned by . + /// /// Contextual information about the being used. /// /// The result of the call to . @@ -109,14 +107,12 @@ ValueTask> SavingChangesAsync( CancellationToken cancellationToken = default); /// - /// - /// Called at the end of . - /// - /// - /// This method is still called if an interceptor suppressed creation of a command in . - /// In this case, is the result returned by . - /// + /// Called at the end of . /// + /// + /// This method is still called if an interceptor suppressed creation of a command in . + /// In this case, is the result returned by . + /// /// Contextual information about the being used. /// /// The result of the call to . diff --git a/src/EFCore/Diagnostics/InterceptionResult.cs b/src/EFCore/Diagnostics/InterceptionResult.cs index 94f40555f00..dece1858680 100644 --- a/src/EFCore/Diagnostics/InterceptionResult.cs +++ b/src/EFCore/Diagnostics/InterceptionResult.cs @@ -4,10 +4,10 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Represents a result from an such as an to allow - /// suppression of the normal operation being intercepted. - /// + /// Represents a result from an such as an to allow + /// suppression of the normal operation being intercepted. + /// + /// /// /// A value of this type is passed to all interceptor methods that are called before the operation /// being intercepted is executed. @@ -15,9 +15,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics /// However, creating a result with causes the operation being /// intercepted to be suppressed; that is, the operation is not executed. /// - /// - /// - /// See EF Core interceptors for more information. + /// + /// See EF Core interceptors for more information. + /// /// public readonly struct InterceptionResult { diff --git a/src/EFCore/Diagnostics/InterceptionResult`.cs b/src/EFCore/Diagnostics/InterceptionResult`.cs index 2e1ac113f1f..b9d64c8a04a 100644 --- a/src/EFCore/Diagnostics/InterceptionResult`.cs +++ b/src/EFCore/Diagnostics/InterceptionResult`.cs @@ -6,10 +6,10 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Represents a result from an such as an to allow - /// suppression of the normal operation being intercepted. - /// + /// Represents a result from an such as an to allow + /// suppression of the normal operation being intercepted. + /// + /// /// /// A value of this type is passed to all interceptor methods that are called before the operation /// being intercepted is executed. @@ -18,9 +18,9 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics /// intercepted to be suppressed; that is, the operation is not executed. /// The value in the result is then used as a substitute return value for the operation that was suppressed. /// - /// - /// - /// See EF Core interceptors for more information. + /// + /// See EF Core interceptors for more information. + /// /// /// The new result to use. public readonly struct InterceptionResult @@ -42,14 +42,12 @@ private InterceptionResult(TResult result) } /// - /// - /// The result to use. - /// - /// - /// The property can only be accessed if is true. The concept here - /// is the same as and - /// + /// The result to use. /// + /// + /// The property can only be accessed if is true. The concept here + /// is the same as and + /// /// when is . public TResult Result { diff --git a/src/EFCore/Diagnostics/InterceptorAggregator.cs b/src/EFCore/Diagnostics/InterceptorAggregator.cs index bebfc6a844a..6fedb351605 100644 --- a/src/EFCore/Diagnostics/InterceptorAggregator.cs +++ b/src/EFCore/Diagnostics/InterceptorAggregator.cs @@ -28,10 +28,8 @@ public virtual Type InterceptorType => typeof(TInterceptor); /// - /// - /// Resolves a single /> from all those registered on - /// the or in the internal service provider. - /// + /// Resolves a single /> from all those registered on + /// the or in the internal service provider. /// /// The interceptors to combine. /// The combined interceptor. diff --git a/src/EFCore/Diagnostics/Internal/DiagnosticsLogger.cs b/src/EFCore/Diagnostics/Internal/DiagnosticsLogger.cs index 908001ca8cf..60c1f56bfea 100644 --- a/src/EFCore/Diagnostics/Internal/DiagnosticsLogger.cs +++ b/src/EFCore/Diagnostics/Internal/DiagnosticsLogger.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class DiagnosticsLogger : IDiagnosticsLogger where TLoggerCategory : LoggerCategory, new() { diff --git a/src/EFCore/Diagnostics/Internal/LoggingOptions.cs b/src/EFCore/Diagnostics/Internal/LoggingOptions.cs index 3e52a4c59d1..2d3478b938c 100644 --- a/src/EFCore/Diagnostics/Internal/LoggingOptions.cs +++ b/src/EFCore/Diagnostics/Internal/LoggingOptions.cs @@ -9,18 +9,16 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class LoggingOptions : ILoggingOptions { /// diff --git a/src/EFCore/Diagnostics/SaveChangesInterceptor.cs b/src/EFCore/Diagnostics/SaveChangesInterceptor.cs index 1bfeca8f862..7f0570e5117 100644 --- a/src/EFCore/Diagnostics/SaveChangesInterceptor.cs +++ b/src/EFCore/Diagnostics/SaveChangesInterceptor.cs @@ -8,10 +8,8 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Abstract base class for for use when implementing a subset - /// of the interface methods. - /// + /// Abstract base class for for use when implementing a subset + /// of the interface methods. /// /// /// See EF Core interceptors for more information. @@ -39,15 +37,13 @@ public virtual InterceptionResult SavingChanges(DbContextEventData eventDat => result; /// - /// - /// Called at the end of . - /// - /// - /// This method is still called if an interceptor suppressed creation of a command in - /// . - /// In this case, is the result returned by . - /// + /// Called at the end of . /// + /// + /// This method is still called if an interceptor suppressed creation of a command in + /// . + /// In this case, is the result returned by . + /// /// Contextual information about the being used. /// /// The result of the call to . @@ -95,15 +91,13 @@ public virtual ValueTask> SavingChangesAsync( => new(result); /// - /// - /// Called at the end of . - /// - /// - /// This method is still called if an interceptor suppressed creation of a command in - /// . - /// In this case, is the result returned by . - /// + /// Called at the end of . /// + /// + /// This method is still called if an interceptor suppressed creation of a command in + /// . + /// In this case, is the result returned by . + /// /// Contextual information about the being used. /// /// The result of the call to . diff --git a/src/EFCore/Diagnostics/WarningsConfiguration.cs b/src/EFCore/Diagnostics/WarningsConfiguration.cs index 4d1e69e8677..db4b8088125 100644 --- a/src/EFCore/Diagnostics/WarningsConfiguration.cs +++ b/src/EFCore/Diagnostics/WarningsConfiguration.cs @@ -10,17 +10,17 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics { /// - /// - /// Represents configuration for which warnings should be thrown, logged, or ignored. - /// by database providers or extensions. These options are set using . - /// + /// Represents configuration for which warnings should be thrown, logged, or ignored. + /// by database providers or extensions. These options are set using . + /// + /// /// /// Instances of this class are designed to be immutable. To change an option, call one of the 'With...' /// methods to obtain a new instance with the option changed. /// - /// - /// - /// See Configuration for specific messages for more information. + /// + /// See Configuration for specific messages for more information. + /// /// public class WarningsConfiguration { diff --git a/src/EFCore/Diagnostics/WarningsConfigurationBuilder.cs b/src/EFCore/Diagnostics/WarningsConfigurationBuilder.cs index 48863fc1e3a..c4f942a6cc1 100644 --- a/src/EFCore/Diagnostics/WarningsConfigurationBuilder.cs +++ b/src/EFCore/Diagnostics/WarningsConfigurationBuilder.cs @@ -14,8 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Diagnostics /// You can set a default behavior and behaviors for each event ID. /// /// - /// This class is used within the - /// + /// This class is used within the /// API and it is not designed to be directly constructed in your application code. /// /// @@ -38,17 +37,17 @@ public WarningsConfigurationBuilder(DbContextOptionsBuilder optionsBuilder) } /// - /// - /// Sets the default behavior when a warning is generated. - /// + /// Sets the default behavior when a warning is generated. + /// + /// /// /// Event ID values can be found in and /// . /// The database provider being used may also define provider-specific event IDs in a similar class. /// - /// - /// - /// See Configuration for specific messages for more information. + /// + /// See Configuration for specific messages for more information. + /// /// /// The desired behavior. /// The same builder instance so that multiple calls can be chained. @@ -56,17 +55,17 @@ public virtual WarningsConfigurationBuilder Default(WarningBehavior warningBehav => WithOption(e => e.WithDefaultBehavior(warningBehavior)); /// - /// - /// Causes an exception to be thrown when the specified event occurs, regardless of default configuration. - /// + /// Causes an exception to be thrown when the specified event occurs, regardless of default configuration. + /// + /// /// /// Event ID values can be found in and /// . /// The database provider being used may also define provider-specific event IDs in a similar class. /// - /// - /// - /// See Configuration for specific messages for more information. + /// + /// See Configuration for specific messages for more information. + /// /// /// /// The IDs for events to configure. @@ -81,17 +80,17 @@ public virtual WarningsConfigurationBuilder Throw( } /// - /// - /// Causes an event to be logged, regardless of default configuration. - /// + /// Causes an event to be logged, regardless of default configuration. + /// + /// /// /// Event ID values can be found in and /// . /// The database provider being used may also define provider-specific event IDs in a similar class. /// - /// - /// - /// See Configuration for specific messages for more information. + /// + /// See Configuration for specific messages for more information. + /// /// /// /// The IDs for events to configure. @@ -106,17 +105,17 @@ public virtual WarningsConfigurationBuilder Log( } /// - /// - /// Causes an event to be logged at the specified level, regardless of default configuration. - /// + /// Causes an event to be logged at the specified level, regardless of default configuration. + /// + /// /// /// Event ID values can be found in and /// . /// The database provider being used may also define provider-specific event IDs in a similar class. /// - /// - /// - /// See Configuration for specific messages for more information. + /// + /// See Configuration for specific messages for more information. + /// /// /// /// The event IDs and levels to configure. @@ -131,17 +130,17 @@ public virtual WarningsConfigurationBuilder Log( } /// - /// - /// Causes nothing to happen when the specified event occurs, regardless of default configuration. - /// + /// Causes nothing to happen when the specified event occurs, regardless of default configuration. + /// + /// /// /// Event ID values can be found in and /// . /// The database provider being used may also define provider-specific event IDs in a similar class. /// - /// - /// - /// See Configuration for specific messages for more information. + /// + /// See Configuration for specific messages for more information. + /// /// /// /// The IDs for events to configure. diff --git a/src/EFCore/EF.cs b/src/EFCore/EF.cs index ffcb554bb7d..eadad0c5db1 100644 --- a/src/EFCore/EF.cs +++ b/src/EFCore/EF.cs @@ -23,17 +23,17 @@ internal static readonly MethodInfo PropertyMethod = typeof(EF).GetRequiredDeclaredMethod(nameof(Property)); /// + /// References a given property or navigation on an entity instance. This is useful for shadow state properties, for + /// which no CLR property exists. Currently this method can only be used in LINQ queries and can not be used to + /// access the value assigned to a property in other scenarios. + /// + /// /// - /// References a given property or navigation on an entity instance. This is useful for shadow state properties, for - /// which no CLR property exists. Currently this method can only be used in LINQ queries and can not be used to - /// access the value assigned to a property in other scenarios. + /// Note that this is a static method accessed through the top-level static type. /// /// - /// Note that this is a static method accessed through the top-level static type. + /// See Using EF.Property in EF Core queries for more information. /// - /// - /// - /// See Using EF.Property in EF Core queries for more information. /// /// /// @@ -54,16 +54,16 @@ public static TProperty Property( => throw new InvalidOperationException(CoreStrings.PropertyMethodInvoked); /// + /// Provides CLR methods that get translated to database functions when used in LINQ to Entities queries. + /// Calling these methods in other contexts (e.g. LINQ to Objects) will throw a . + /// + /// /// - /// Provides CLR methods that get translated to database functions when used in LINQ to Entities queries. - /// Calling these methods in other contexts (e.g. LINQ to Objects) will throw a . + /// Note that this is a static property accessed through the top-level static type. /// /// - /// Note that this is a static property accessed through the top-level static type. + /// See Database functions for more information. /// - /// - /// - /// See Database functions for more information. /// public static DbFunctions Functions => DbFunctions.Instance; diff --git a/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs b/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs index 053505c41c9..2244be2ba56 100644 --- a/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs +++ b/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs @@ -25,16 +25,16 @@ namespace Microsoft.EntityFrameworkCore public static class EntityFrameworkQueryableExtensions { /// + /// Generates a string representation of the query used. This string may not be suitable for direct execution is intended only + /// for use in debugging. + /// + /// /// - /// Generates a string representation of the query used. This string may not be suitable for direct execution is intended only - /// for use in debugging. + /// This method is only typically supported by queries generated by Entity Framework Core. /// /// - /// This is only typically supported by queries generated by Entity Framework Core. + /// See Viewing SQL generated by EF Core for more information. /// - /// - /// - /// See Viewing SQL generated by EF Core for more information. /// /// The query source. /// The query string for debugging. @@ -2533,11 +2533,11 @@ internal static readonly MethodInfo ThenIncludeAfterEnumerableMethodInfo .Where(mi => mi.GetGenericArguments().Count() == 3) .Single( mi => - { - var typeInfo = mi.GetParameters()[0].ParameterType.GenericTypeArguments[1]; - return typeInfo.IsGenericType - && typeInfo.GetGenericTypeDefinition() == typeof(IEnumerable<>); - }); + { + var typeInfo = mi.GetParameters()[0].ParameterType.GenericTypeArguments[1]; + return typeInfo.IsGenericType + && typeInfo.GetGenericTypeDefinition() == typeof(IEnumerable<>); + }); internal static readonly MethodInfo ThenIncludeAfterReferenceMethodInfo = typeof(EntityFrameworkQueryableExtensions) @@ -2824,11 +2824,11 @@ internal static readonly MethodInfo AsNoTrackingMethodInfo .GetRequiredDeclaredMethod(nameof(AsNoTracking)); /// - /// - /// The change tracker will not track any of the entities that are returned from a LINQ query. If the - /// entity instances are modified, this will not be detected by the change tracker and - /// will not persist those changes to the database. - /// + /// The change tracker will not track any of the entities that are returned from a LINQ query. If the + /// entity instances are modified, this will not be detected by the change tracker and + /// will not persist those changes to the database. + /// + /// /// /// Disabling change tracking is useful for read-only scenarios because it avoids the overhead of setting /// up change tracking for each entity instance. You should not disable change tracking if you want to @@ -2842,9 +2842,9 @@ internal static readonly MethodInfo AsNoTrackingMethodInfo /// /// The default tracking behavior for queries can be controlled by . /// - /// - /// - /// See No-tracking queries in EF Core for more information. + /// + /// See No-tracking queries in EF Core for more information. + /// /// /// The type of entity being queried. /// The source query. @@ -2871,11 +2871,11 @@ internal static readonly MethodInfo AsNoTrackingWithIdentityResolutionMethodInfo .GetRequiredDeclaredMethod(nameof(AsNoTrackingWithIdentityResolution)); /// - /// - /// The change tracker will not track any of the entities that are returned from a LINQ query. If the - /// entity instances are modified, this will not be detected by the change tracker and - /// will not persist those changes to the database. - /// + /// The change tracker will not track any of the entities that are returned from a LINQ query. If the + /// entity instances are modified, this will not be detected by the change tracker and + /// will not persist those changes to the database. + /// + /// /// /// Disabling change tracking is useful for read-only scenarios because it avoids the overhead of setting /// up change tracking for each entity instance. You should not disable change tracking if you want to @@ -2889,9 +2889,9 @@ internal static readonly MethodInfo AsNoTrackingWithIdentityResolutionMethodInfo /// /// The default tracking behavior for queries can be controlled by . /// - /// - /// - /// See No-tracking queries in EF Core for more information. + /// + /// See No-tracking queries in EF Core for more information. + /// /// /// The type of entity being queried. /// The source query. @@ -2920,17 +2920,17 @@ internal static readonly MethodInfo AsTrackingMethodInfo .Single(m => m.GetParameters().Length == 1); /// + /// Returns a new query where the change tracker will keep track of changes for all entities that are returned. + /// Any modification to the entity instances will be detected and persisted to the database during + /// . + /// + /// /// - /// Returns a new query where the change tracker will keep track of changes for all entities that are returned. - /// Any modification to the entity instances will be detected and persisted to the database during - /// . + /// The default tracking behavior for queries can be controlled by . /// /// - /// The default tracking behavior for queries can be controlled by . + /// See Tracking queries in EF Core for more information. /// - /// - /// - /// See Tracking queries in EF Core for more information. /// /// The type of entity being queried. /// The source query. @@ -2953,14 +2953,14 @@ source.Provider is EntityQueryProvider } /// - /// - /// Returns a new query where the change tracker will either keep track of changes or not for all entities - /// that are returned, depending on the value of the 'track' parameter. When tracking, Any modification - /// to the entity instances will be detected and persisted to the database during - /// . When not tracking, if the entity instances are modified, this will - /// not be detected by the change tracker and will not persist those - /// changes to the database. - /// + /// Returns a new query where the change tracker will either keep track of changes or not for all entities + /// that are returned, depending on the value of the 'track' parameter. When tracking, Any modification + /// to the entity instances will be detected and persisted to the database during + /// . When not tracking, if the entity instances are modified, this will + /// not be detected by the change tracker and will not persist those + /// changes to the database. + /// + /// /// /// Disabling change tracking is useful for read-only scenarios because it avoids the overhead of setting /// up change tracking for each entity instance. You should not disable change tracking if you want to @@ -2970,9 +2970,9 @@ source.Provider is EntityQueryProvider /// /// The default tracking behavior for queries can be controlled by . /// - /// - /// - /// See Tracking queries in EF Core for more information. + /// + /// See Tracking queries in EF Core for more information. + /// /// /// The type of entity being queried. /// The source query. diff --git a/src/EFCore/Extensions/EntityFrameworkServiceCollectionExtensions.cs b/src/EFCore/Extensions/EntityFrameworkServiceCollectionExtensions.cs index ae9722344de..3cc8c02ec2c 100644 --- a/src/EFCore/Extensions/EntityFrameworkServiceCollectionExtensions.cs +++ b/src/EFCore/Extensions/EntityFrameworkServiceCollectionExtensions.cs @@ -21,9 +21,9 @@ namespace Microsoft.Extensions.DependencyInjection public static class EntityFrameworkServiceCollectionExtensions { /// - /// - /// Registers the given context as a service in the . - /// + /// Registers the given context as a service in the . + /// + /// /// /// Use this method when using dependency injection in your application, such as with ASP.NET Core. /// For applications that don't use dependency injection, consider creating @@ -39,7 +39,7 @@ public static class EntityFrameworkServiceCollectionExtensions /// /// See Using DbContext with dependency injection for more information. /// - /// + /// /// The type of context to be registered. /// The to add services to. /// @@ -70,9 +70,9 @@ public static IServiceCollection AddDbContext( => AddDbContext(serviceCollection, optionsAction, contextLifetime, optionsLifetime); /// - /// - /// Registers the given context as a service in the . - /// + /// Registers the given context as a service in the . + /// + /// /// /// Use this method when using dependency injection in your application, such as with ASP.NET Core. /// For applications that don't use dependency injection, consider creating @@ -88,7 +88,7 @@ public static IServiceCollection AddDbContext( /// /// See Using DbContext with dependency injection for more information. /// - /// + /// /// The class or interface that will be used to resolve the context from the container. /// The concrete implementation type to create. /// The to add services to. @@ -124,10 +124,10 @@ public static IServiceCollection AddDbContext optionsAction(b), contextLifetime, optionsLifetime); /// - /// - /// Registers the given as a service in the , - /// and enables DbContext pooling for this registration. - /// + /// Registers the given as a service in the , + /// and enables DbContext pooling for this registration. + /// + /// /// /// DbContext pooling can increase performance in high-throughput scenarios by re-using context instances. /// However, for most application this performance gain is very small. @@ -151,15 +151,13 @@ public static IServiceCollection AddDbContextUsing DbContext with dependency injection and /// Using DbContext pooling for more information. /// - /// + /// /// The type of context to be registered. /// The to add services to. /// - /// - /// A required action to configure the for the context. When using - /// context pooling, options configuration must be performed externally; - /// will not be called. - /// + /// A required action to configure the for the context. When using + /// context pooling, options configuration must be performed externally; + /// will not be called. /// /// Sets the maximum number of instances retained by the pool. Defaults to 1024. /// The same service collection so that multiple calls can be chained. @@ -171,10 +169,10 @@ public static IServiceCollection AddDbContextPool( => AddDbContextPool(serviceCollection, optionsAction, poolSize); /// - /// - /// Registers the given as a service in the , - /// and enables DbContext pooling for this registration. - /// + /// Registers the given as a service in the , + /// and enables DbContext pooling for this registration. + /// + /// /// /// DbContext pooling can increase performance in high-throughput scenarios by re-using context instances. /// However, for most application this performance gain is very small. @@ -198,16 +196,14 @@ public static IServiceCollection AddDbContextPool( /// See Using DbContext with dependency injection and /// Using DbContext pooling for more information. /// - /// + /// /// The class or interface that will be used to resolve the context from the container. /// The concrete implementation type to create. /// The to add services to. /// - /// - /// A required action to configure the for the context. When using - /// context pooling, options configuration must be performed externally; - /// will not be called. - /// + /// A required action to configure the for the context. When using + /// context pooling, options configuration must be performed externally; + /// will not be called. /// /// Sets the maximum number of instances retained by the pool. Defaults to 1024. /// The same service collection so that multiple calls can be chained. @@ -224,10 +220,10 @@ public static IServiceCollection AddDbContextPool - /// - /// Registers the given as a service in the , - /// and enables DbContext pooling for this registration. - /// + /// Registers the given as a service in the , + /// and enables DbContext pooling for this registration. + /// + /// /// /// DbContext pooling can increase performance in high-throughput scenarios by re-using context instances. /// However, for most application this performance gain is very small. @@ -259,15 +255,13 @@ public static IServiceCollection AddDbContextPool which allows /// Entity Framework to create and maintain its own for internal Entity Framework services. /// - /// + /// /// The type of context to be registered. /// The to add services to. /// - /// - /// A required action to configure the for the context. When using - /// context pooling, options configuration must be performed externally; - /// will not be called. - /// + /// A required action to configure the for the context. When using + /// context pooling, options configuration must be performed externally; + /// will not be called. /// /// Sets the maximum number of instances retained by the pool. Defaults to 1024. /// The same service collection so that multiple calls can be chained. @@ -279,10 +273,10 @@ public static IServiceCollection AddDbContextPool( => AddDbContextPool(serviceCollection, optionsAction, poolSize); /// - /// - /// Registers the given as a service in the , - /// and enables DbContext pooling for this registration. - /// + /// Registers the given as a service in the , + /// and enables DbContext pooling for this registration. + /// + /// /// /// DbContext pooling can increase performance in high-throughput scenarios by re-using context instances. /// However, for most application this performance gain is very small. @@ -315,16 +309,14 @@ public static IServiceCollection AddDbContextPool( /// which allows Entity Framework to create and maintain its own for internal /// Entity Framework services. /// - /// + /// /// The class or interface that will be used to resolve the context from the container. /// The concrete implementation type to create. /// The to add services to. /// - /// - /// A required action to configure the for the context. When using - /// context pooling, options configuration must be performed externally; - /// will not be called. - /// + /// A required action to configure the for the context. When using + /// context pooling, options configuration must be performed externally; + /// will not be called. /// /// Sets the maximum number of instances retained by the pool. Defaults to 1024. /// The same service collection so that multiple calls can be chained. @@ -370,21 +362,21 @@ private static void AddPoolingOptions( AddCoreServices( serviceCollection, (sp, ob) => - { - optionsAction(sp, ob); + { + optionsAction(sp, ob); - var extension = (ob.Options.FindExtension() ?? new CoreOptionsExtension()) - .WithMaxPoolSize(poolSize); + var extension = (ob.Options.FindExtension() ?? new CoreOptionsExtension()) + .WithMaxPoolSize(poolSize); - ((IDbContextOptionsBuilderInfrastructure)ob).AddOrUpdateExtension(extension); - }, + ((IDbContextOptionsBuilderInfrastructure)ob).AddOrUpdateExtension(extension); + }, ServiceLifetime.Singleton); } /// - /// - /// Registers the given context as a service in the . - /// + /// Registers the given context as a service in the . + /// + /// /// /// Use this method when using dependency injection in your application, such as with ASP.NET Core. /// For applications that don't use dependency injection, consider creating @@ -400,7 +392,7 @@ private static void AddPoolingOptions( /// /// See Using DbContext with dependency injection for more information. /// - /// + /// /// The type of context to be registered. /// The to add services to. /// The lifetime with which to register the DbContext service in the container. @@ -414,9 +406,9 @@ public static IServiceCollection AddDbContext( => AddDbContext(serviceCollection, contextLifetime, optionsLifetime); /// - /// - /// Registers the given context as a service in the . - /// + /// Registers the given context as a service in the . + /// + /// /// /// Use this method when using dependency injection in your application, such as with ASP.NET Core. /// For applications that don't use dependency injection, consider creating @@ -432,7 +424,7 @@ public static IServiceCollection AddDbContext( /// /// See Using DbContext with dependency injection for more information. /// - /// + /// /// The class or interface that will be used to resolve the context from the container. /// The concrete implementation type to create. /// The to add services to. @@ -452,9 +444,9 @@ public static IServiceCollection AddDbContext - /// - /// Registers the given context as a service in the . - /// + /// Registers the given context as a service in the . + /// + /// /// /// Use this method when using dependency injection in your application, such as with ASP.NET Core. /// For applications that don't use dependency injection, consider creating @@ -485,7 +477,7 @@ public static IServiceCollection AddDbContext for internal /// Entity Framework services. /// - /// + /// /// The type of context to be registered. /// The to add services to. /// @@ -516,9 +508,9 @@ public static IServiceCollection AddDbContext( => AddDbContext(serviceCollection, optionsAction, contextLifetime, optionsLifetime); /// - /// - /// Registers the given context as a service in the . - /// + /// Registers the given context as a service in the . + /// + /// /// /// Use this method when using dependency injection in your application, such as with ASP.NET Core. /// For applications that don't use dependency injection, consider creating @@ -544,7 +536,7 @@ public static IServiceCollection AddDbContext( /// which allows Entity Framework to create and maintain its own for internal /// Entity Framework services. /// - /// + /// /// The class or interface that will be used to resolve the context from the container. /// The concrete implementation type to create. /// The to add services to. @@ -613,10 +605,10 @@ public static IServiceCollection AddDbContext - /// - /// Registers an in the to create instances - /// of given type. - /// + /// Registers an in the to create instances + /// of given type. + /// + /// /// /// Registering a factory instead of registering the context type directly allows for easy creation of new /// instances. @@ -643,7 +635,7 @@ public static IServiceCollection AddDbContextUsing DbContext with dependency injection and /// Using DbContext factories for more information. /// - /// + /// /// The type of to be created by the factory. /// The to add services to. /// @@ -675,10 +667,10 @@ public static IServiceCollection AddDbContextFactory( => AddDbContextFactory>(serviceCollection, optionsAction, lifetime); /// - /// - /// Registers an in the to create instances - /// of given type. - /// + /// Registers an in the to create instances + /// of given type. + /// + /// /// /// Registering a factory instead of registering the context type directly allows for easy creation of new /// instances. @@ -709,7 +701,7 @@ public static IServiceCollection AddDbContextFactory( /// See Using DbContext with dependency injection and /// Using DbContext factories for more information. /// - /// + /// /// The type of to be created by the factory. /// The type of to register. /// The to add services to. @@ -748,10 +740,10 @@ public static IServiceCollection AddDbContextFactory( lifetime); /// - /// - /// Registers an in the to create instances - /// of given type. - /// + /// Registers an in the to create instances + /// of given type. + /// + /// /// /// Registering a factory instead of registering the context type directly allows for easy creation of new /// instances. @@ -786,7 +778,7 @@ public static IServiceCollection AddDbContextFactory( /// See Using DbContext with dependency injection and /// Using DbContext factories for more information. /// - /// + /// /// The type of to be created by the factory. /// The to add services to. /// @@ -818,10 +810,10 @@ public static IServiceCollection AddDbContextFactory( => AddDbContextFactory>(serviceCollection, optionsAction, lifetime); /// - /// - /// Registers an in the to create instances - /// of given type. - /// + /// Registers an in the to create instances + /// of given type. + /// + /// /// /// Registering a factory instead of registering the context type directly allows for easy creation of new /// instances. @@ -860,7 +852,7 @@ public static IServiceCollection AddDbContextFactory( /// See Using DbContext with dependency injection and /// Using DbContext factories for more information. /// - /// + /// /// The type of to be created by the factory. /// The type of to register. /// The to add services to. @@ -916,10 +908,10 @@ public static IServiceCollection AddDbContextFactory( } /// - /// - /// Registers an in the to create instances - /// of given type where instances are pooled for reuse. - /// + /// Registers an in the to create instances + /// of given type where instances are pooled for reuse. + /// + /// /// /// Registering a factory instead of registering the context type directly allows for easy creation of new /// instances. @@ -943,15 +935,13 @@ public static IServiceCollection AddDbContextFactory( /// Using DbContext factories, and /// Using DbContext pooling for more information. /// - /// + /// /// The type of to be created by the factory. /// The to add services to. /// - /// - /// A required action to configure the for the context. When using - /// context pooling, options configuration must be performed externally; - /// will not be called. - /// + /// A required action to configure the for the context. When using + /// context pooling, options configuration must be performed externally; + /// will not be called. /// /// Sets the maximum number of instances retained by the pool. Defaults to 1024. /// The same service collection so that multiple calls can be chained. @@ -967,10 +957,10 @@ public static IServiceCollection AddPooledDbContextFactory( } /// - /// - /// Registers an in the to create instances - /// of given type where instances are pooled for reuse. - /// + /// Registers an in the to create instances + /// of given type where instances are pooled for reuse. + /// + /// /// /// Registering a factory instead of registering the context type directly allows for easy creation of new /// instances. @@ -994,15 +984,13 @@ public static IServiceCollection AddPooledDbContextFactory( /// Using DbContext factories, and /// Using DbContext pooling for more information. /// - /// + /// /// The type of to be created by the factory. /// The to add services to. /// - /// - /// A required action to configure the for the context. When using - /// context pooling, options configuration must be performed externally; - /// will not be called. - /// + /// A required action to configure the for the context. When using + /// context pooling, options configuration must be performed externally; + /// will not be called. /// /// Sets the maximum number of instances retained by the pool. Defaults to 1024. /// The same service collection so that multiple calls can be chained. diff --git a/src/EFCore/Extensions/PropertyExtensions.cs b/src/EFCore/Extensions/PropertyExtensions.cs index b695cf82484..c3fdda8c9d6 100644 --- a/src/EFCore/Extensions/PropertyExtensions.cs +++ b/src/EFCore/Extensions/PropertyExtensions.cs @@ -74,10 +74,10 @@ public static bool IsKey(this IProperty property) => property.IsKey(); /// - /// - /// Gets a value indicating whether or not this property can be modified before the entity is - /// saved to the database. - /// + /// Gets a value indicating whether or not this property can be modified before the entity is + /// saved to the database. + /// + /// /// /// If , then an exception /// will be thrown if a value is assigned to this property when it is in @@ -87,17 +87,17 @@ public static bool IsKey(this IProperty property) /// If , then any value /// set will be ignored when it is in the state. /// - /// + /// /// The property. [Obsolete("Use IReadOnlyProperty.GetBeforeSaveBehavior")] public static PropertySaveBehavior GetBeforeSaveBehavior(this IProperty property) => property.GetBeforeSaveBehavior(); /// - /// - /// Gets a value indicating whether or not this property can be modified after the entity is - /// saved to the database. - /// + /// Gets a value indicating whether or not this property can be modified after the entity is + /// saved to the database. + /// + /// /// /// If , then an exception /// will be thrown if a new value is assigned to this property after the entity exists in the database. @@ -106,7 +106,7 @@ public static PropertySaveBehavior GetBeforeSaveBehavior(this IProperty property /// If , then any modification to the /// property value of an entity that already exists in the database will be ignored. /// - /// + /// /// The property. [Obsolete("Use IReadOnlyProperty.GetAfterSaveBehavior")] public static PropertySaveBehavior GetAfterSaveBehavior(this IProperty property) diff --git a/src/EFCore/IDbContextFactory.cs b/src/EFCore/IDbContextFactory.cs index 541ca7bbc94..c9b838d3593 100644 --- a/src/EFCore/IDbContextFactory.cs +++ b/src/EFCore/IDbContextFactory.cs @@ -18,24 +18,20 @@ public interface IDbContextFactory where TContext : DbContext { /// - /// - /// Creates a new instance. - /// - /// - /// The caller is responsible for disposing the context; it will not be disposed by any dependency injection container. - /// + /// Creates a new instance. /// + /// + /// The caller is responsible for disposing the context; it will not be disposed by any dependency injection container. + /// /// A new context instance. TContext CreateDbContext(); /// - /// - /// Creates a new instance in an async context. - /// - /// - /// The caller is responsible for disposing the context; it will not be disposed by any dependency injection container. - /// + /// Creates a new instance in an async context. /// + /// + /// The caller is responsible for disposing the context; it will not be disposed by any dependency injection container. + /// /// A to observe while waiting for the task to complete. /// A task containing the created context that represents the asynchronous operation. /// If the is canceled. diff --git a/src/EFCore/Infrastructure/AccessorExtensions.cs b/src/EFCore/Infrastructure/AccessorExtensions.cs index 11f39d33922..1895ff74c5f 100644 --- a/src/EFCore/Infrastructure/AccessorExtensions.cs +++ b/src/EFCore/Infrastructure/AccessorExtensions.cs @@ -16,25 +16,25 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// These methods are typically used by database providers (and other extensions). They are generally /// not used in application code. /// - /// - /// is used to hide properties that are not intended to be used in - /// application code but can be used in extension methods written by database providers etc. - /// /// + /// + /// is used to hide properties that are not intended to be used in + /// application code but can be used in extension methods written by database providers etc. + /// public static class AccessorExtensions { /// - /// - /// Resolves a service from the exposed from a type that implements - /// . - /// + /// Resolves a service from the exposed from a type that implements + /// . + /// + /// /// /// is used to hide properties that are not intended to be used in /// application code but can be used in extension methods written by database providers etc. /// - /// - /// - /// See Accessing DbContext services for more information. + /// + /// See Accessing DbContext services for more information. + /// /// /// The type of service to be resolved. /// The object exposing the service provider. @@ -52,11 +52,11 @@ public static TService GetService(this IInfrastructure - /// - /// is used to hide properties that are not intended to be used in - /// application code but can be used in extension methods written by database providers etc. - /// /// + /// + /// is used to hide properties that are not intended to be used in + /// application code but can be used in extension methods written by database providers etc. + /// /// The type of the property being hidden by . /// The object that exposes the property. /// The object assigned to the property. diff --git a/src/EFCore/Infrastructure/AnnotatableBase.cs b/src/EFCore/Infrastructure/AnnotatableBase.cs index 757b5e21a6c..c6f7b1056a2 100644 --- a/src/EFCore/Infrastructure/AnnotatableBase.cs +++ b/src/EFCore/Infrastructure/AnnotatableBase.cs @@ -31,12 +31,12 @@ public class AnnotatableBase : IAnnotatable private ConcurrentDictionary? _runtimeAnnotations; /// - /// Indicates whether the current object is read-only. - /// - /// Annotations cannot be changed when the object is read-only. - /// Runtime annotations cannot be changed when the object is not read-only. - /// + /// Indicates whether the current object is read-only. /// + /// + /// Annotations cannot be changed when the object is read-only. + /// Runtime annotations cannot be changed when the object is not read-only. + /// public virtual bool IsReadOnly => false; diff --git a/src/EFCore/Infrastructure/DatabaseFacade.cs b/src/EFCore/Infrastructure/DatabaseFacade.cs index ae3b19368c2..2d94eb2d640 100644 --- a/src/EFCore/Infrastructure/DatabaseFacade.cs +++ b/src/EFCore/Infrastructure/DatabaseFacade.cs @@ -40,9 +40,9 @@ private IDatabaseFacadeDependencies Dependencies => _dependencies ??= _context.GetService(); /// - /// - /// Ensures that the database for the context exists. - /// + /// Ensures that the database for the context exists. + /// + /// /// /// /// @@ -74,19 +74,19 @@ private IDatabaseFacadeDependencies Dependencies /// then you can use /// to ensure the database is created using migrations and that all migrations have been applied. /// - /// - /// - /// See Managing database schemas with EF Core - /// and Database creation APIs for more information. + /// + /// See Managing database schemas with EF Core + /// and Database creation APIs for more information. + /// /// /// if the database is created, if it already existed. public virtual bool EnsureCreated() => Dependencies.DatabaseCreator.EnsureCreated(); /// - /// - /// Ensures that the database for the context exists. - /// + /// Ensures that the database for the context exists. + /// + /// /// /// /// @@ -118,8 +118,6 @@ public virtual bool EnsureCreated() /// then you can use /// to ensure the database is created using migrations and that all migrations have been applied. /// - /// - /// /// /// Entity Framework Core does not support multiple parallel operations being run on the same DbContext instance. This /// includes both parallel execution of async queries and any explicit concurrent use from multiple threads. @@ -150,15 +148,17 @@ public virtual Task EnsureCreatedAsync(CancellationToken cancellationToken /// Warning: The entire database is deleted, and no effort is made to remove just the database objects that are used by /// the model for this context. /// + /// + /// /// /// It is common to use immediately following when /// testing or prototyping using Entity Framework. This ensures that the database is in a clean state before each /// execution of the test/prototype. Note, however, that data in the database is not preserved. /// - /// - /// - /// See Managing database schemas with EF Core - /// and Database creation APIs for more information. + /// + /// See Managing database schemas with EF Core + /// and Database creation APIs for more information. + /// /// /// if the database is deleted, if it did not exist. public virtual bool EnsureDeleted() @@ -173,13 +173,13 @@ public virtual bool EnsureDeleted() /// Warning: The entire database is deleted, and no effort is made to remove just the database objects that are used by /// the model for this context. /// + /// + /// /// /// It is common to use immediately following when /// testing or prototyping using Entity Framework. This ensures that the database is in a clean state before each /// execution of the test/prototype. Note, however, that data in the database is not preserved. /// - /// - /// /// /// Entity Framework Core does not support multiple parallel operations being run on the same DbContext instance. This /// includes both parallel execution of async queries and any explicit concurrent use from multiple threads. @@ -202,9 +202,9 @@ public virtual Task EnsureDeletedAsync(CancellationToken cancellationToken => Dependencies.DatabaseCreator.EnsureDeletedAsync(cancellationToken); /// - /// - /// Determines whether or not the database is available and can be connected to. - /// + /// Determines whether or not the database is available and can be connected to. + /// + /// /// /// Any exceptions thrown when attempting to connect are caught and not propagated to the application. /// @@ -216,18 +216,18 @@ public virtual Task EnsureDeletedAsync(CancellationToken cancellationToken /// Note that being able to connect to the database does not mean that it is /// up-to-date with regard to schema creation, etc. /// - /// - /// - /// See Database connections in EF Core for more information. + /// + /// See Database connections in EF Core for more information. + /// /// /// if the database is available; otherwise. public virtual bool CanConnect() => Dependencies.DatabaseCreator.CanConnect(); /// - /// - /// Determines whether or not the database is available and can be connected to. - /// + /// Determines whether or not the database is available and can be connected to. + /// + /// /// /// Any exceptions thrown when attempting to connect are caught and not propagated to the application. /// @@ -239,8 +239,6 @@ public virtual bool CanConnect() /// Note that being able to connect to the database does not mean that it is /// up-to-date with regard to schema creation, etc. /// - /// - /// /// /// Entity Framework Core does not support multiple parallel operations being run on the same DbContext instance. This /// includes both parallel execution of async queries and any explicit concurrent use from multiple threads. @@ -363,10 +361,10 @@ public virtual IExecutionStrategy CreateExecutionStrategy() => Dependencies.ExecutionStrategyFactory.Create(); /// - /// - /// Gets the current being used by the context, or null - /// if no transaction is in use. - /// + /// Gets the current being used by the context, or null + /// if no transaction is in use. + /// + /// /// /// This property is null unless one of , /// , or @@ -379,19 +377,19 @@ public virtual IExecutionStrategy CreateExecutionStrategy() /// /// on the returned . /// - /// - /// - /// See Transactions in EF Core for more information. + /// + /// See Transactions in EF Core for more information. + /// /// public virtual IDbContextTransaction? CurrentTransaction => Dependencies.TransactionManager.CurrentTransaction; /// - /// - /// Gets or sets a value indicating whether or not a transaction will be created - /// automatically by if none of the - /// 'BeginTransaction' or 'UseTransaction' methods have been called. - /// + /// Gets or sets a value indicating whether or not a transaction will be created + /// automatically by if none of the + /// 'BeginTransaction' or 'UseTransaction' methods have been called. + /// + /// /// /// Setting this value to will also disable the /// for @@ -404,17 +402,17 @@ public virtual IDbContextTransaction? CurrentTransaction /// Setting this value to should only be done with caution since the database /// could be left in a corrupted state if fails. /// - /// - /// - /// See Transactions in EF Core for more information. + /// + /// See Transactions in EF Core for more information. + /// /// public virtual bool AutoTransactionsEnabled { get; set; } = true; /// - /// - /// Whether a transaction savepoint will be created automatically by if it is called - /// after a transaction has been manually started with . - /// + /// Whether a transaction savepoint will be created automatically by if it is called + /// after a transaction has been manually started with . + /// + /// /// /// The default value is , meaning that will create a /// transaction savepoint within a manually-started transaction. Regardless of this property, savepoints are only created @@ -424,30 +422,30 @@ public virtual IDbContextTransaction? CurrentTransaction /// Setting this value to should only be done with caution since the database could be left in a /// corrupted state if fails. /// - /// - /// - /// See Transactions in EF Core for more information. + /// + /// See Transactions in EF Core for more information. + /// /// public virtual bool AutoSavepointsEnabled { get; set; } = true; /// - /// - /// Returns the name of the database provider currently in use. - /// The name is typically the name of the provider assembly. - /// It is usually easier to use a sugar method such as - /// - /// instead of calling this method directly. - /// + /// Returns the name of the database provider currently in use. + /// The name is typically the name of the provider assembly. + /// It is usually easier to use a sugar method such as + /// + /// instead of calling this method directly. + /// + /// /// /// This method can only be used after the has been configured because /// it is only then that the provider is known. This means that this method cannot be used /// in because this is where application code sets the /// provider to use as part of configuring the context. /// - /// - /// - /// See DbContext lifetime, configuration, and initialization - /// for more information. + /// + /// See DbContext lifetime, configuration, and initialization + /// for more information. + /// /// public virtual string? ProviderName // Needs to be lazy because used from OnModelCreating diff --git a/src/EFCore/Infrastructure/EntityFrameworkServicesBuilder.cs b/src/EFCore/Infrastructure/EntityFrameworkServicesBuilder.cs index e4b62adbe68..c9826c578c5 100644 --- a/src/EFCore/Infrastructure/EntityFrameworkServicesBuilder.cs +++ b/src/EFCore/Infrastructure/EntityFrameworkServicesBuilder.cs @@ -31,9 +31,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// A builder API designed for database providers to use when registering services. - /// + /// A builder API designed for database providers to use when registering services. + /// + /// /// /// Providers should create an instance of this class, use its methods to register /// services, and then call to fill out the remaining Entity @@ -47,25 +47,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// may register a service with a different scope, but great care must be taken that all its dependencies /// can handle the new scope, and that it does not cause issue for services that depend on it. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class EntityFrameworkServicesBuilder { /// - /// - /// 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. - /// - /// - /// This dictionary is exposed for testing and provider-validation only. - /// It should not be used from application code. - /// + /// 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. /// + /// + /// This dictionary is exposed for testing and provider-validation only. + /// It should not be used from application code. + /// [EntityFrameworkInternal] public static readonly IDictionary CoreServices = new Dictionary @@ -230,12 +228,12 @@ public virtual EntityFrameworkServicesBuilder TryAddProviderSpecificServices(Act Check.NotNull(serviceMap, nameof(serviceMap)); ServiceCollectionMap.Validate = serviceType => + { + if (TryGetServiceCharacteristics(serviceType) != null) { - if (TryGetServiceCharacteristics(serviceType) != null) - { - throw new InvalidOperationException(CoreStrings.NotAProviderService(serviceType.Name)); - } - }; + throw new InvalidOperationException(CoreStrings.NotAProviderService(serviceType.Name)); + } + }; serviceMap(ServiceCollectionMap); diff --git a/src/EFCore/Infrastructure/ExpressionExtensions.cs b/src/EFCore/Infrastructure/ExpressionExtensions.cs index 63eed143ac4..cbf728d9e5a 100644 --- a/src/EFCore/Infrastructure/ExpressionExtensions.cs +++ b/src/EFCore/Infrastructure/ExpressionExtensions.cs @@ -143,26 +143,22 @@ public static bool TryGetIndexerArguments( } /// - /// - /// Gets the represented by a simple property-access expression. - /// - /// - /// This method is typically used to parse property access lambdas from fluent APIs. - /// + /// Gets the represented by a simple property-access expression. /// + /// + /// This method is typically used to parse property access lambdas from fluent APIs. + /// /// The expression. /// The . public static PropertyInfo GetPropertyAccess(this LambdaExpression propertyAccessExpression) => GetInternalMemberAccess(propertyAccessExpression); /// - /// - /// Gets the represented by a simple member-access expression. - /// - /// - /// This method is typically used to parse member access lambdas from fluent APIs. - /// + /// Gets the represented by a simple member-access expression. /// + /// + /// This method is typically used to parse member access lambdas from fluent APIs. + /// /// The expression. /// The . public static MemberInfo GetMemberAccess(this LambdaExpression memberAccessExpression) @@ -211,10 +207,10 @@ private static TMemberInfo GetInternalMemberAccess(this LambdaExpre } /// - /// - /// Returns a list of extracted from the given simple - /// . - /// + /// Returns a list of extracted from the given simple + /// . + /// + /// /// /// Only simple expressions are supported, such as those used to reference a property. /// @@ -222,7 +218,7 @@ private static TMemberInfo GetInternalMemberAccess(this LambdaExpre /// This method is typically used by database providers (and other extensions). It is generally /// not used in application code. /// - /// + /// /// The expression. /// The list of referenced properties. public static IReadOnlyList GetPropertyAccessList(this LambdaExpression propertyAccessExpression) @@ -250,10 +246,10 @@ public static IReadOnlyList GetPropertyAccessList(this LambdaExpre } /// - /// - /// Returns a list of extracted from the given simple - /// . - /// + /// Returns a list of extracted from the given simple + /// . + /// + /// /// /// Only simple expressions are supported, such as those used to reference a member. /// @@ -261,7 +257,7 @@ public static IReadOnlyList GetPropertyAccessList(this LambdaExpre /// This method is typically used by database providers (and other extensions). It is generally /// not used in application code. /// - /// + /// /// The expression. /// The list of referenced members. public static IReadOnlyList GetMemberAccessList(this LambdaExpression memberAccessExpression) diff --git a/src/EFCore/Infrastructure/IConcurrencyDetector.cs b/src/EFCore/Infrastructure/IConcurrencyDetector.cs index f64d3867099..9cd57ead135 100644 --- a/src/EFCore/Infrastructure/IConcurrencyDetector.cs +++ b/src/EFCore/Infrastructure/IConcurrencyDetector.cs @@ -6,20 +6,20 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Used by EF internal code and database providers to detect concurrent access to non-thread-safe - /// resources. - /// + /// Used by EF internal code and database providers to detect concurrent access to non-thread-safe + /// resources. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IConcurrencyDetector { diff --git a/src/EFCore/Infrastructure/ICoreSingletonOptions.cs b/src/EFCore/Infrastructure/ICoreSingletonOptions.cs index 8126a97b91e..862ccde6bea 100644 --- a/src/EFCore/Infrastructure/ICoreSingletonOptions.cs +++ b/src/EFCore/Infrastructure/ICoreSingletonOptions.cs @@ -7,18 +7,18 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Options set at the singleton level to control core options. - /// + /// Options set at the singleton level to control core options. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface ICoreSingletonOptions : ISingletonOptions { diff --git a/src/EFCore/Infrastructure/ICurrentDbContext.cs b/src/EFCore/Infrastructure/ICurrentDbContext.cs index 14bef09ea61..e7616edeb1b 100644 --- a/src/EFCore/Infrastructure/ICurrentDbContext.cs +++ b/src/EFCore/Infrastructure/ICurrentDbContext.cs @@ -14,16 +14,18 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface ICurrentDbContext { diff --git a/src/EFCore/Infrastructure/IDbContextOptions.cs b/src/EFCore/Infrastructure/IDbContextOptions.cs index c2fc77bccf8..6e8318b16eb 100644 --- a/src/EFCore/Infrastructure/IDbContextOptions.cs +++ b/src/EFCore/Infrastructure/IDbContextOptions.cs @@ -7,22 +7,22 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// The options to be used by a . You normally override - /// or use a - /// to create instances of classes that implement this interface, they are not designed to be directly created - /// in your application code. - /// + /// The options to be used by a . You normally override + /// or use a + /// to create instances of classes that implement this interface, they are not designed to be directly created + /// in your application code. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IDbContextOptions { diff --git a/src/EFCore/Infrastructure/IDbSetFinder.cs b/src/EFCore/Infrastructure/IDbSetFinder.cs index 5437f2c8e8f..1a5bbefe6a1 100644 --- a/src/EFCore/Infrastructure/IDbSetFinder.cs +++ b/src/EFCore/Infrastructure/IDbSetFinder.cs @@ -8,15 +8,13 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// A service for finding properties on a type that inherits from . - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// A service for finding properties on a type that inherits from . /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IDbSetFinder { /// diff --git a/src/EFCore/Infrastructure/IModelCacheKeyFactory.cs b/src/EFCore/Infrastructure/IModelCacheKeyFactory.cs index 019729f7c1d..e1646a9e792 100644 --- a/src/EFCore/Infrastructure/IModelCacheKeyFactory.cs +++ b/src/EFCore/Infrastructure/IModelCacheKeyFactory.cs @@ -7,18 +7,18 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Creates keys that uniquely identifies the model for a given context. This is used to store and lookup - /// a cached model for a given context. - /// + /// Creates keys that uniquely identifies the model for a given context. This is used to store and lookup + /// a cached model for a given context. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See EF Core model caching for more information. + /// + /// See EF Core model caching for more information. + /// /// public interface IModelCacheKeyFactory { diff --git a/src/EFCore/Infrastructure/IModelCustomizer.cs b/src/EFCore/Infrastructure/IModelCustomizer.cs index 78aa03f165d..ffd318043ce 100644 --- a/src/EFCore/Infrastructure/IModelCustomizer.cs +++ b/src/EFCore/Infrastructure/IModelCustomizer.cs @@ -13,6 +13,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This interface is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// When replacing this service consider deriving the implementation from or /// to preserve the default behavior. @@ -22,23 +24,21 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IModelCustomizer { /// - /// - /// Builds the model for a given context. - /// - /// - /// If any instance data from is - /// used when building the model, then the implementation of - /// also needs to be updated to ensure the model is cached correctly. - /// + /// Builds the model for a given context. /// + /// + /// If any instance data from is + /// used when building the model, then the implementation of + /// also needs to be updated to ensure the model is cached correctly. + /// /// /// The builder being used to construct the model. /// diff --git a/src/EFCore/Infrastructure/IModelRuntimeInitializer.cs b/src/EFCore/Infrastructure/IModelRuntimeInitializer.cs index 55353e18748..0bfbd82b5c9 100644 --- a/src/EFCore/Infrastructure/IModelRuntimeInitializer.cs +++ b/src/EFCore/Infrastructure/IModelRuntimeInitializer.cs @@ -17,15 +17,17 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This interface is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IModelRuntimeInitializer { diff --git a/src/EFCore/Infrastructure/IModelSource.cs b/src/EFCore/Infrastructure/IModelSource.cs index 332640016de..d91d3e7e7aa 100644 --- a/src/EFCore/Infrastructure/IModelSource.cs +++ b/src/EFCore/Infrastructure/IModelSource.cs @@ -17,15 +17,17 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This interface is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IModelSource { diff --git a/src/EFCore/Infrastructure/IModelValidator.cs b/src/EFCore/Infrastructure/IModelValidator.cs index 79b103faa6c..17ca06a2519 100644 --- a/src/EFCore/Infrastructure/IModelValidator.cs +++ b/src/EFCore/Infrastructure/IModelValidator.cs @@ -8,18 +8,18 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Validates a model after it is built. - /// + /// Validates a model after it is built. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IModelValidator { diff --git a/src/EFCore/Infrastructure/IResettableService.cs b/src/EFCore/Infrastructure/IResettableService.cs index 19984f154e3..e087abcb118 100644 --- a/src/EFCore/Infrastructure/IResettableService.cs +++ b/src/EFCore/Infrastructure/IResettableService.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is and multiple registrations /// are allowed. This means that each instance will use its own @@ -24,10 +26,10 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementations may depend on other services registered with any lifetime. /// The implementations do not need to be thread-safe. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IResettableService { diff --git a/src/EFCore/Infrastructure/ISingletonOptions.cs b/src/EFCore/Infrastructure/ISingletonOptions.cs index 373f8563e83..226d0adf3d4 100644 --- a/src/EFCore/Infrastructure/ISingletonOptions.cs +++ b/src/EFCore/Infrastructure/ISingletonOptions.cs @@ -11,16 +11,18 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// Implemented by any class that represents options that can only be set at the /// singleton level. /// + /// + /// /// /// The service lifetime is and multiple registrations /// are allowed. This means a single instance of each service is used by many /// instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface ISingletonOptions { diff --git a/src/EFCore/Infrastructure/IndentedStringBuilder.cs b/src/EFCore/Infrastructure/IndentedStringBuilder.cs index fe69aa219f0..97bda872a43 100644 --- a/src/EFCore/Infrastructure/IndentedStringBuilder.cs +++ b/src/EFCore/Infrastructure/IndentedStringBuilder.cs @@ -109,13 +109,11 @@ public virtual IndentedStringBuilder AppendLine() } /// - /// - /// Appends the current indent, the given string, and a new line to the string being built. - /// - /// - /// If the given string itself contains a new line, the part of the string after that new line will not be indented. - /// + /// Appends the current indent, the given string, and a new line to the string being built. /// + /// + /// If the given string itself contains a new line, the part of the string after that new line will not be indented. + /// /// The string to append. /// This builder so that additional calls can be chained. public virtual IndentedStringBuilder AppendLine(string value) diff --git a/src/EFCore/Infrastructure/Internal/ConcurrencyDetector.cs b/src/EFCore/Infrastructure/Internal/ConcurrencyDetector.cs index d2e8438a7ce..124a61a472a 100644 --- a/src/EFCore/Infrastructure/Internal/ConcurrencyDetector.cs +++ b/src/EFCore/Infrastructure/Internal/ConcurrencyDetector.cs @@ -10,19 +10,17 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class ConcurrencyDetector : IConcurrencyDetector { private int _inCriticalSection; diff --git a/src/EFCore/Infrastructure/Internal/CoreSingletonOptions.cs b/src/EFCore/Infrastructure/Internal/CoreSingletonOptions.cs index f14a2eb2efe..3c19f712cca 100644 --- a/src/EFCore/Infrastructure/Internal/CoreSingletonOptions.cs +++ b/src/EFCore/Infrastructure/Internal/CoreSingletonOptions.cs @@ -9,18 +9,16 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class CoreSingletonOptions : ICoreSingletonOptions { /// diff --git a/src/EFCore/Infrastructure/Internal/CurrentDbContext.cs b/src/EFCore/Infrastructure/Internal/CurrentDbContext.cs index f6c00d6a550..eeb34bf4501 100644 --- a/src/EFCore/Infrastructure/Internal/CurrentDbContext.cs +++ b/src/EFCore/Infrastructure/Internal/CurrentDbContext.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 sealed class CurrentDbContext : ICurrentDbContext { /// diff --git a/src/EFCore/Infrastructure/Internal/DbSetFinder.cs b/src/EFCore/Infrastructure/Internal/DbSetFinder.cs index ecb80caec64..487b7a899a7 100644 --- a/src/EFCore/Infrastructure/Internal/DbSetFinder.cs +++ b/src/EFCore/Infrastructure/Internal/DbSetFinder.cs @@ -12,18 +12,16 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class DbSetFinder : IDbSetFinder { private readonly ConcurrentDictionary> _cache = new(); diff --git a/src/EFCore/Infrastructure/Internal/InternalServiceCollectionMap.cs b/src/EFCore/Infrastructure/Internal/InternalServiceCollectionMap.cs index bc41b09828b..80417f1e7cf 100644 --- a/src/EFCore/Infrastructure/Internal/InternalServiceCollectionMap.cs +++ b/src/EFCore/Infrastructure/Internal/InternalServiceCollectionMap.cs @@ -116,12 +116,12 @@ public virtual IInternalServiceCollectionMap AddDependency(Type serviceType, Ser } /// - /// - /// 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. - /// + /// 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. + /// + /// /// /// Re-writes the registration for the given service such that if the implementation type /// implements , then @@ -133,7 +133,7 @@ public virtual IInternalServiceCollectionMap AddDependency(Type serviceType, Ser /// This mechanism should only be used to allow new services to be injected in a patch or /// point release without making binary breaking changes. /// - /// + /// /// The service contract. /// The map, such that further calls can be chained. public virtual InternalServiceCollectionMap DoPatchInjection() diff --git a/src/EFCore/Infrastructure/Internal/LazyLoader.cs b/src/EFCore/Infrastructure/Internal/LazyLoader.cs index ad09a680b38..fc0a249332b 100644 --- a/src/EFCore/Infrastructure/Internal/LazyLoader.cs +++ b/src/EFCore/Infrastructure/Internal/LazyLoader.cs @@ -14,19 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// entity 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// entity 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 class LazyLoader : ILazyLoader { private bool _disposed; diff --git a/src/EFCore/Infrastructure/ModelCacheKey.cs b/src/EFCore/Infrastructure/ModelCacheKey.cs index f8405f1be54..64d380546d5 100644 --- a/src/EFCore/Infrastructure/ModelCacheKey.cs +++ b/src/EFCore/Infrastructure/ModelCacheKey.cs @@ -6,11 +6,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// A key that uniquely identifies the model for a given context. This is used to store and lookup - /// a cached model for a given context. This default implementation uses the context type as they key, thus - /// assuming that all contexts of a given type have the same model. - /// + /// A key that uniquely identifies the model for a given context. This is used to store and lookup + /// a cached model for a given context. This default implementation uses the context type as they key, thus + /// assuming that all contexts of a given type have the same model. /// /// /// See EF Core model caching for more information. diff --git a/src/EFCore/Infrastructure/ModelCacheKeyFactory.cs b/src/EFCore/Infrastructure/ModelCacheKeyFactory.cs index 1f520c78865..51212ac917d 100644 --- a/src/EFCore/Infrastructure/ModelCacheKeyFactory.cs +++ b/src/EFCore/Infrastructure/ModelCacheKeyFactory.cs @@ -7,19 +7,19 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Creates keys that uniquely identifies the model for a given context. This is used to store and lookup - /// a cached model for a given context. This default implementation uses the context type as they key, thus - /// assuming that all contexts of a given type have the same model. - /// + /// Creates keys that uniquely identifies the model for a given context. This is used to store and lookup + /// a cached model for a given context. This default implementation uses the context type as they key, thus + /// assuming that all contexts of a given type have the same model. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See EF Core model caching for more information. + /// + /// See EF Core model caching for more information. + /// /// public class ModelCacheKeyFactory : IModelCacheKeyFactory { diff --git a/src/EFCore/Infrastructure/ModelCacheKeyFactoryDependencies.cs b/src/EFCore/Infrastructure/ModelCacheKeyFactoryDependencies.cs index 84e2948d170..19c5df94e7b 100644 --- a/src/EFCore/Infrastructure/ModelCacheKeyFactoryDependencies.cs +++ b/src/EFCore/Infrastructure/ModelCacheKeyFactoryDependencies.cs @@ -13,6 +13,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// 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 @@ -27,28 +29,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record ModelCacheKeyFactoryDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ModelCacheKeyFactoryDependencies() { diff --git a/src/EFCore/Infrastructure/ModelCreationDependencies.cs b/src/EFCore/Infrastructure/ModelCreationDependencies.cs index 21590b973a5..cc53088cfed 100644 --- a/src/EFCore/Infrastructure/ModelCreationDependencies.cs +++ b/src/EFCore/Infrastructure/ModelCreationDependencies.cs @@ -10,19 +10,17 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 sealed record ModelCreationDependencies { /// diff --git a/src/EFCore/Infrastructure/ModelCustomizer.cs b/src/EFCore/Infrastructure/ModelCustomizer.cs index 48471600bb9..3c8a34b4b44 100644 --- a/src/EFCore/Infrastructure/ModelCustomizer.cs +++ b/src/EFCore/Infrastructure/ModelCustomizer.cs @@ -15,15 +15,17 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class ModelCustomizer : IModelCustomizer { diff --git a/src/EFCore/Infrastructure/ModelCustomizerDependencies.cs b/src/EFCore/Infrastructure/ModelCustomizerDependencies.cs index 9e5bb8a70a8..ec939492f04 100644 --- a/src/EFCore/Infrastructure/ModelCustomizerDependencies.cs +++ b/src/EFCore/Infrastructure/ModelCustomizerDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// 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 @@ -29,28 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record ModelCustomizerDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ModelCustomizerDependencies(IDbSetFinder setFinder) { diff --git a/src/EFCore/Infrastructure/ModelDependencies.cs b/src/EFCore/Infrastructure/ModelDependencies.cs index 6e789653bd1..675b25b01c0 100644 --- a/src/EFCore/Infrastructure/ModelDependencies.cs +++ b/src/EFCore/Infrastructure/ModelDependencies.cs @@ -16,6 +16,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// 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 @@ -30,28 +32,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record ModelDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ModelDependencies( IDiagnosticsLogger logger) diff --git a/src/EFCore/Infrastructure/ModelRuntimeInitializer.cs b/src/EFCore/Infrastructure/ModelRuntimeInitializer.cs index 670225d0227..fb827aefe9e 100644 --- a/src/EFCore/Infrastructure/ModelRuntimeInitializer.cs +++ b/src/EFCore/Infrastructure/ModelRuntimeInitializer.cs @@ -17,15 +17,17 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class ModelRuntimeInitializer : IModelRuntimeInitializer { @@ -101,15 +103,15 @@ public virtual IModel Initialize( model = model.GetOrAddRuntimeAnnotationValue( CoreAnnotationNames.ReadOnlyModel, static model => + { + if (model is Model mutableModel) { - if (model is Model mutableModel) - { - // This assumes OnModelFinalized is thread-safe - model = mutableModel.OnModelFinalized(); - } + // This assumes OnModelFinalized is thread-safe + model = mutableModel.OnModelFinalized(); + } - return model!; - }, + return model!; + }, model); return model; diff --git a/src/EFCore/Infrastructure/ModelRuntimeInitializerDependencies.cs b/src/EFCore/Infrastructure/ModelRuntimeInitializerDependencies.cs index c3715468084..d2c8404006f 100644 --- a/src/EFCore/Infrastructure/ModelRuntimeInitializerDependencies.cs +++ b/src/EFCore/Infrastructure/ModelRuntimeInitializerDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// 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 @@ -28,28 +30,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record ModelRuntimeInitializerDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// 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. - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ModelRuntimeInitializerDependencies( RuntimeModelDependencies runtimeModelDependencies, diff --git a/src/EFCore/Infrastructure/ModelSource.cs b/src/EFCore/Infrastructure/ModelSource.cs index 02b443ff6a1..b35c09cd5a6 100644 --- a/src/EFCore/Infrastructure/ModelSource.cs +++ b/src/EFCore/Infrastructure/ModelSource.cs @@ -21,15 +21,17 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class ModelSource : IModelSource { diff --git a/src/EFCore/Infrastructure/ModelSourceDependencies.cs b/src/EFCore/Infrastructure/ModelSourceDependencies.cs index 7354193a15d..91d0ce4a1b8 100644 --- a/src/EFCore/Infrastructure/ModelSourceDependencies.cs +++ b/src/EFCore/Infrastructure/ModelSourceDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// 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 @@ -29,28 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record ModelSourceDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// 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. - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ModelSourceDependencies( IModelCustomizer modelCustomizer, diff --git a/src/EFCore/Infrastructure/ModelValidator.cs b/src/EFCore/Infrastructure/ModelValidator.cs index 3432b61db8c..fa1d933aa11 100644 --- a/src/EFCore/Infrastructure/ModelValidator.cs +++ b/src/EFCore/Infrastructure/ModelValidator.cs @@ -17,18 +17,18 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// The validator that enforces core rules common for all providers. - /// + /// The validator that enforces core rules common for all providers. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class ModelValidator : IModelValidator { @@ -288,7 +288,7 @@ protected virtual void ValidatePropertyMapping( } /// - /// Throws an with a message containing provider-specific information, when + /// Throws an with a message containing provider-specific information, when /// available, indicating possible reasons why the property cannot be mapped. /// /// The property CLR type. @@ -296,12 +296,12 @@ protected virtual void ValidatePropertyMapping( /// The property. protected virtual void ThrowPropertyNotMappedException( string propertyType, - IConventionEntityType entityType, + IConventionEntityType entityType, IConventionProperty unmappedProperty) => throw new InvalidOperationException( CoreStrings.PropertyNotMapped( propertyType, - entityType.DisplayName(), + entityType.DisplayName(), unmappedProperty.Name)); /// diff --git a/src/EFCore/Infrastructure/ModelValidatorDependencies.cs b/src/EFCore/Infrastructure/ModelValidatorDependencies.cs index 9767f126594..962cbfc6e5a 100644 --- a/src/EFCore/Infrastructure/ModelValidatorDependencies.cs +++ b/src/EFCore/Infrastructure/ModelValidatorDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// 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 @@ -31,32 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record ModelValidatorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// This type is typically used by database providers (and other extensions). It is generally - /// not used in application code. - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ModelValidatorDependencies( ITypeMappingSource typeMappingSource, diff --git a/src/EFCore/Infrastructure/PooledDbContextFactory.cs b/src/EFCore/Infrastructure/PooledDbContextFactory.cs index f83dc439375..79793c9b59c 100644 --- a/src/EFCore/Infrastructure/PooledDbContextFactory.cs +++ b/src/EFCore/Infrastructure/PooledDbContextFactory.cs @@ -8,19 +8,19 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// A factory returning pooled instances. Disposing the instance returned by this factory returns - /// them to the internal pooling mechanism. - /// + /// A factory returning pooled instances. Disposing the instance returned by this factory returns + /// them to the internal pooling mechanism. + /// + /// /// /// A service of this type is registered in the dependency injection container by the /// methods. /// - /// - /// - /// See Using DbContext with dependency injection, - /// Using DbContext factories, and - /// Using DbContext pooling for more information. + /// + /// See Using DbContext with dependency injection, + /// Using DbContext factories, and + /// Using DbContext pooling for more information. + /// /// public class PooledDbContextFactory : IDbContextFactory where TContext : DbContext diff --git a/src/EFCore/Infrastructure/RuntimeModelDependencies.cs b/src/EFCore/Infrastructure/RuntimeModelDependencies.cs index d7cd4edd9b5..b7a42daad66 100644 --- a/src/EFCore/Infrastructure/RuntimeModelDependencies.cs +++ b/src/EFCore/Infrastructure/RuntimeModelDependencies.cs @@ -16,6 +16,8 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// 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 @@ -30,28 +32,23 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record RuntimeModelDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public RuntimeModelDependencies( ITypeMappingSource typeMappingSource, diff --git a/src/EFCore/Infrastructure/ServiceCollectionMap.cs b/src/EFCore/Infrastructure/ServiceCollectionMap.cs index 20c1babe500..c1acafcf1cd 100644 --- a/src/EFCore/Infrastructure/ServiceCollectionMap.cs +++ b/src/EFCore/Infrastructure/ServiceCollectionMap.cs @@ -10,20 +10,20 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure { /// - /// - /// Provides a map over a that allows - /// entries to be conditionally added or re-written without requiring linear scans of the service - /// collection each time this is done. - /// + /// Provides a map over a that allows + /// entries to be conditionally added or re-written without requiring linear scans of the service + /// collection each time this is done. + /// + /// /// /// Note that the collection should not be modified without in other ways while it is being managed /// by the map. The collection can be used in the normal way after modifications using the map have /// been completed. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class ServiceCollectionMap : IInfrastructure { diff --git a/src/EFCore/Internal/DbContextDependencies.cs b/src/EFCore/Internal/DbContextDependencies.cs index 5db8d8cfdfb..057a4cacaa5 100644 --- a/src/EFCore/Internal/DbContextDependencies.cs +++ b/src/EFCore/Internal/DbContextDependencies.cs @@ -10,9 +10,9 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// Service dependencies parameter class for - /// + /// Service dependencies parameter class for + /// + /// /// /// 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 @@ -25,7 +25,7 @@ namespace Microsoft.EntityFrameworkCore.Internal /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record DbContextDependencies : IDbContextDependencies { /// diff --git a/src/EFCore/Internal/DbContextServices.cs b/src/EFCore/Internal/DbContextServices.cs index c12c2e0b5b1..0dd9493ad23 100644 --- a/src/EFCore/Internal/DbContextServices.cs +++ b/src/EFCore/Internal/DbContextServices.cs @@ -14,19 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class DbContextServices : IDbContextServices { private IServiceProvider? _scopedProvider; diff --git a/src/EFCore/Internal/DbSetInitializer.cs b/src/EFCore/Internal/DbSetInitializer.cs index f3326f89b86..d9b4a51bb09 100644 --- a/src/EFCore/Internal/DbSetInitializer.cs +++ b/src/EFCore/Internal/DbSetInitializer.cs @@ -8,18 +8,16 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class DbSetInitializer : IDbSetInitializer { private readonly IDbSetFinder _setFinder; diff --git a/src/EFCore/Internal/DbSetSource.cs b/src/EFCore/Internal/DbSetSource.cs index 0a2394886fe..4b839722f3b 100644 --- a/src/EFCore/Internal/DbSetSource.cs +++ b/src/EFCore/Internal/DbSetSource.cs @@ -10,18 +10,16 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class DbSetSource : IDbSetSource { private static readonly MethodInfo _genericCreateSet diff --git a/src/EFCore/Internal/EntityFinderSource.cs b/src/EFCore/Internal/EntityFinderSource.cs index 2c6663d6bd8..99d620ba8c3 100644 --- a/src/EFCore/Internal/EntityFinderSource.cs +++ b/src/EFCore/Internal/EntityFinderSource.cs @@ -12,18 +12,16 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class EntityFinderSource : IEntityFinderSource { private static readonly MethodInfo _genericCreate diff --git a/src/EFCore/Internal/IDbContextDependencies.cs b/src/EFCore/Internal/IDbContextDependencies.cs index 1f8cf8edc68..6fff17cc013 100644 --- a/src/EFCore/Internal/IDbContextDependencies.cs +++ b/src/EFCore/Internal/IDbContextDependencies.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IDbContextDependencies { /// diff --git a/src/EFCore/Internal/IDbContextServices.cs b/src/EFCore/Internal/IDbContextServices.cs index 24f1697ce0f..bdd49c6d1c4 100644 --- a/src/EFCore/Internal/IDbContextServices.cs +++ b/src/EFCore/Internal/IDbContextServices.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IDbContextServices { /// diff --git a/src/EFCore/Internal/IDbSetInitializer.cs b/src/EFCore/Internal/IDbSetInitializer.cs index a8636da3352..0afe7b41f34 100644 --- a/src/EFCore/Internal/IDbSetInitializer.cs +++ b/src/EFCore/Internal/IDbSetInitializer.cs @@ -6,18 +6,16 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IDbSetInitializer { /// diff --git a/src/EFCore/Internal/IDbSetSource.cs b/src/EFCore/Internal/IDbSetSource.cs index bd5718bfcdb..1c40af1e8ad 100644 --- a/src/EFCore/Internal/IDbSetSource.cs +++ b/src/EFCore/Internal/IDbSetSource.cs @@ -7,18 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IDbSetSource { /// diff --git a/src/EFCore/Internal/IEntityFinderSource.cs b/src/EFCore/Internal/IEntityFinderSource.cs index 1df811a7cb2..ec08bb7be05 100644 --- a/src/EFCore/Internal/IEntityFinderSource.cs +++ b/src/EFCore/Internal/IEntityFinderSource.cs @@ -8,18 +8,16 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IEntityFinderSource { /// diff --git a/src/EFCore/Internal/IRegisteredServices.cs b/src/EFCore/Internal/IRegisteredServices.cs index 2fdfdb33183..aaccb8adfb3 100644 --- a/src/EFCore/Internal/IRegisteredServices.cs +++ b/src/EFCore/Internal/IRegisteredServices.cs @@ -8,18 +8,16 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IRegisteredServices { /// diff --git a/src/EFCore/Internal/ISingletonOptionsInitializer.cs b/src/EFCore/Internal/ISingletonOptionsInitializer.cs index 4d32e46d91a..896f2ac0254 100644 --- a/src/EFCore/Internal/ISingletonOptionsInitializer.cs +++ b/src/EFCore/Internal/ISingletonOptionsInitializer.cs @@ -8,18 +8,16 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface ISingletonOptionsInitializer { /// diff --git a/src/EFCore/Internal/RegisteredServices.cs b/src/EFCore/Internal/RegisteredServices.cs index ae77a8a70b6..adc97d4c8a5 100644 --- a/src/EFCore/Internal/RegisteredServices.cs +++ b/src/EFCore/Internal/RegisteredServices.cs @@ -8,18 +8,16 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class RegisteredServices : IRegisteredServices { /// diff --git a/src/EFCore/Internal/SingletonOptionsInitializer.cs b/src/EFCore/Internal/SingletonOptionsInitializer.cs index 279672acd29..46777249bf1 100644 --- a/src/EFCore/Internal/SingletonOptionsInitializer.cs +++ b/src/EFCore/Internal/SingletonOptionsInitializer.cs @@ -9,18 +9,16 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class SingletonOptionsInitializer : ISingletonOptionsInitializer { private volatile bool _isInitialized; diff --git a/src/EFCore/Internal/TypeFullNameComparer.cs b/src/EFCore/Internal/TypeFullNameComparer.cs index c6cdc998460..5ceec061a7d 100644 --- a/src/EFCore/Internal/TypeFullNameComparer.cs +++ b/src/EFCore/Internal/TypeFullNameComparer.cs @@ -7,12 +7,10 @@ namespace Microsoft.EntityFrameworkCore.Internal { /// - /// - /// 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. - /// + /// 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. /// public sealed class TypeFullNameComparer : IComparer, IEqualityComparer { diff --git a/src/EFCore/Metadata/Builders/CollectionCollectionBuilder.cs b/src/EFCore/Metadata/Builders/CollectionCollectionBuilder.cs index 6018d58dfda..5ebfccf4206 100644 --- a/src/EFCore/Metadata/Builders/CollectionCollectionBuilder.cs +++ b/src/EFCore/Metadata/Builders/CollectionCollectionBuilder.cs @@ -11,16 +11,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a one-to-many relationship. - /// + /// Provides a simple API for configuring a one-to-many relationship. + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class CollectionCollectionBuilder { diff --git a/src/EFCore/Metadata/Builders/CollectionCollectionBuilder`.cs b/src/EFCore/Metadata/Builders/CollectionCollectionBuilder`.cs index d539f652dc7..c3ccab69f22 100644 --- a/src/EFCore/Metadata/Builders/CollectionCollectionBuilder`.cs +++ b/src/EFCore/Metadata/Builders/CollectionCollectionBuilder`.cs @@ -8,16 +8,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a many-to-many relationship. - /// + /// Provides a simple API for configuring a many-to-many relationship. + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// /// One of the entity types in this relationship. /// One of the entity types in this relationship. diff --git a/src/EFCore/Metadata/Builders/CollectionNavigationBuilder.cs b/src/EFCore/Metadata/Builders/CollectionNavigationBuilder.cs index 69cf92bc728..04f944194de 100644 --- a/src/EFCore/Metadata/Builders/CollectionNavigationBuilder.cs +++ b/src/EFCore/Metadata/Builders/CollectionNavigationBuilder.cs @@ -108,15 +108,13 @@ public CollectionNavigationBuilder( => Builder; /// - /// - /// Configures this as a one-to-many relationship. - /// - /// - /// Note that calling this method with no parameters will explicitly configure this side - /// of the relationship to use no navigation property, even if such a property exists on the - /// entity type. If the navigation property is to be used, then it must be specified. - /// + /// Configures this as a one-to-many relationship. /// + /// + /// Note that calling this method with no parameters will explicitly configure this side + /// of the relationship to use no navigation property, even if such a property exists on the + /// entity type. If the navigation property is to be used, then it must be specified. + /// /// /// The name of the reference navigation property on the other end of this relationship. /// If null or not specified, then there is no navigation property on the other end of the relationship. @@ -215,9 +213,7 @@ private InternalForeignKeyBuilder WithOneBuilder(MemberIdentity reference) } /// - /// - /// Configures this as a many-to-many relationship. - /// + /// Configures this as a many-to-many relationship. /// /// /// The name of the collection navigation property on the other end of this relationship. diff --git a/src/EFCore/Metadata/Builders/CollectionNavigationBuilder`.cs b/src/EFCore/Metadata/Builders/CollectionNavigationBuilder`.cs index 85f4674034d..5ca3a4e9255 100644 --- a/src/EFCore/Metadata/Builders/CollectionNavigationBuilder`.cs +++ b/src/EFCore/Metadata/Builders/CollectionNavigationBuilder`.cs @@ -12,16 +12,14 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a relationship where configuration began on - /// an end of the relationship with a collection that contains instances of another entity type. - /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Provides a simple API for configuring a relationship where configuration began on + /// an end of the relationship with a collection that contains instances of another entity type. /// /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. + /// + /// /// See Modeling entity types and relationships for more information. /// /// The entity type to be configured. @@ -64,15 +62,13 @@ public CollectionNavigationBuilder( Check.NullButNotEmpty(navigationName, nameof(navigationName))).Metadata); /// - /// - /// Configures this as a one-to-many relationship. - /// - /// - /// Note that calling this method with no parameters will explicitly configure this side - /// of the relationship to use no navigation property, even if such a property exists on the - /// entity type. If the navigation property is to be used, then it must be specified. - /// + /// Configures this as a one-to-many relationship. /// + /// + /// Note that calling this method with no parameters will explicitly configure this side + /// of the relationship to use no navigation property, even if such a property exists on the + /// entity type. If the navigation property is to be used, then it must be specified. + /// /// /// A lambda expression representing the reference navigation property on the other end of this /// relationship (post => post.Blog). If no property is specified, the relationship will be diff --git a/src/EFCore/Metadata/Builders/EntityTypeBuilder.cs b/src/EFCore/Metadata/Builders/EntityTypeBuilder.cs index ddfd8d17216..081a2e7540c 100644 --- a/src/EFCore/Metadata/Builders/EntityTypeBuilder.cs +++ b/src/EFCore/Metadata/Builders/EntityTypeBuilder.cs @@ -16,15 +16,13 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring an . - /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Provides a simple API for configuring an . /// /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. + /// + /// /// See Modeling entity types and relationships for more information. /// public class EntityTypeBuilder : IInfrastructure @@ -116,16 +114,14 @@ public virtual EntityTypeBuilder HasNoKey() } /// - /// - /// Returns an object that can be used to configure a property of the entity type. - /// If no property with the given name exists, then a new property will be added. - /// - /// - /// When adding a new property with this overload the property name must match the - /// name of a CLR property or field on the entity type. This overload cannot be used to - /// add a new shadow state property. - /// + /// Returns an object that can be used to configure a property of the entity type. + /// If no property with the given name exists, then a new property will be added. /// + /// + /// When adding a new property with this overload the property name must match the + /// name of a CLR property or field on the entity type. This overload cannot be used to + /// add a new shadow state property. + /// /// The name of the property to be configured. /// An object that can be used to configure the property. public virtual PropertyBuilder Property(string propertyName) @@ -135,18 +131,16 @@ public virtual PropertyBuilder Property(string propertyName) ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Returns an object that can be used to configure a property of the entity type. - /// If no property with the given name exists, then a new property will be added. - /// - /// - /// When adding a new property, if a property with the same name exists in the entity class - /// then it will be added to the model. If no property exists in the entity class, then - /// a new shadow state property will be added. A shadow state property is one that does not have a - /// corresponding property in the entity class. The current value for the property is stored in - /// the rather than being stored in instances of the entity class. - /// + /// Returns an object that can be used to configure a property of the entity type. + /// If no property with the given name exists, then a new property will be added. /// + /// + /// When adding a new property, if a property with the same name exists in the entity class + /// then it will be added to the model. If no property exists in the entity class, then + /// a new shadow state property will be added. A shadow state property is one that does not have a + /// corresponding property in the entity class. The current value for the property is stored in + /// the rather than being stored in instances of the entity class. + /// /// The type of the property to be configured. /// The name of the property to be configured. /// An object that can be used to configure the property. @@ -157,18 +151,16 @@ public virtual PropertyBuilder Property(string propertyNam Check.NotEmpty(propertyName, nameof(propertyName)), ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Returns an object that can be used to configure a property of the entity type. - /// If no property with the given name exists, then a new property will be added. - /// - /// - /// When adding a new property, if a property with the same name exists in the entity class - /// then it will be added to the model. If no property exists in the entity class, then - /// a new shadow state property will be added. A shadow state property is one that does not have a - /// corresponding property in the entity class. The current value for the property is stored in - /// the rather than being stored in instances of the entity class. - /// + /// Returns an object that can be used to configure a property of the entity type. + /// If no property with the given name exists, then a new property will be added. /// + /// + /// When adding a new property, if a property with the same name exists in the entity class + /// then it will be added to the model. If no property exists in the entity class, then + /// a new shadow state property will be added. A shadow state property is one that does not have a + /// corresponding property in the entity class. The current value for the property is stored in + /// the rather than being stored in instances of the entity class. + /// /// The type of the property to be configured. /// The name of the property to be configured. /// An object that can be used to configure the property. @@ -179,16 +171,14 @@ public virtual PropertyBuilder Property(Type propertyType, string propertyName) Check.NotEmpty(propertyName, nameof(propertyName)), ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Returns an object that can be used to configure a property of the entity type. - /// If no property with the given name exists, then a new property will be added. - /// - /// - /// Indexer properties are stored in the entity using - /// an indexer - /// supplying the provided property name. - /// + /// Returns an object that can be used to configure a property of the entity type. + /// If no property with the given name exists, then a new property will be added. /// + /// + /// Indexer properties are stored in the entity using + /// an indexer + /// supplying the provided property name. + /// /// The type of the property to be configured. /// The name of the property to be configured. /// An object that can be used to configure the property. @@ -199,16 +189,14 @@ public virtual PropertyBuilder IndexerProperty(string prop Check.NotEmpty(propertyName, nameof(propertyName)), ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Returns an object that can be used to configure a property of the entity type. - /// If no property with the given name exists, then a new property will be added. - /// - /// - /// Indexer properties are stored in the entity using - /// an indexer - /// supplying the provided property name. - /// + /// Returns an object that can be used to configure a property of the entity type. + /// If no property with the given name exists, then a new property will be added. /// + /// + /// Indexer properties are stored in the entity using + /// an indexer + /// supplying the provided property name. + /// /// The type of the property to be configured. /// The name of the property to be configured. /// An object that can be used to configure the property. @@ -219,10 +207,8 @@ public virtual PropertyBuilder IndexerProperty(Type propertyType, string propert Check.NotEmpty(propertyName, nameof(propertyName)), ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Returns an object that can be used to configure an existing navigation property of the entity type. - /// It is an error for the navigation property not to exist. - /// + /// Returns an object that can be used to configure an existing navigation property of the entity type. + /// It is an error for the navigation property not to exist. /// /// The name of the navigation property to be configured. /// An object that can be used to configure the navigation property. @@ -285,9 +271,9 @@ public virtual IndexBuilder HasIndex( ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -300,7 +286,7 @@ public virtual IndexBuilder HasIndex( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -314,9 +300,9 @@ public virtual OwnedNavigationBuilder OwnsOne( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -329,7 +315,7 @@ public virtual OwnedNavigationBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -345,9 +331,9 @@ public virtual OwnedNavigationBuilder OwnsOne( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -360,7 +346,7 @@ public virtual OwnedNavigationBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -374,9 +360,9 @@ public virtual OwnedNavigationBuilder OwnsOne( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -389,7 +375,7 @@ public virtual OwnedNavigationBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -410,9 +396,9 @@ public virtual EntityTypeBuilder OwnsOne( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -425,7 +411,7 @@ public virtual EntityTypeBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -449,9 +435,9 @@ public virtual EntityTypeBuilder OwnsOne( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -464,7 +450,7 @@ public virtual EntityTypeBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -499,9 +485,9 @@ private OwnedNavigationBuilder OwnsOneBuilder(in TypeIdentity ownedType, string } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -514,7 +500,7 @@ private OwnedNavigationBuilder OwnsOneBuilder(in TypeIdentity ownedType, string /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -528,9 +514,9 @@ public virtual OwnedNavigationBuilder OwnsMany( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -543,7 +529,7 @@ public virtual OwnedNavigationBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -559,9 +545,9 @@ public virtual OwnedNavigationBuilder OwnsMany( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -574,7 +560,7 @@ public virtual OwnedNavigationBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -588,9 +574,9 @@ public virtual OwnedNavigationBuilder OwnsMany( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -603,7 +589,7 @@ public virtual OwnedNavigationBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -624,9 +610,9 @@ public virtual EntityTypeBuilder OwnsMany( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -639,7 +625,7 @@ public virtual EntityTypeBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -663,9 +649,9 @@ public virtual EntityTypeBuilder OwnsMany( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -678,7 +664,7 @@ public virtual EntityTypeBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -713,10 +699,10 @@ private OwnedNavigationBuilder OwnsManyBuilder(in TypeIdentity ownedType, string } /// - /// - /// Configures a relationship where this entity type has a reference that points - /// to a single instance of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a reference that points + /// to a single instance of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -729,7 +715,7 @@ private OwnedNavigationBuilder OwnsManyBuilder(in TypeIdentity ownedType, string /// the relationship. Calling just this method without the chained call will not /// produce a valid relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. If @@ -756,10 +742,10 @@ public virtual ReferenceNavigationBuilder HasOne( } /// - /// - /// Configures a relationship where this entity type has a reference that points - /// to a single instance of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a reference that points + /// to a single instance of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -772,7 +758,7 @@ public virtual ReferenceNavigationBuilder HasOne( /// the relationship. Calling just this method without the chained call will not /// produce a valid relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. If @@ -799,18 +785,16 @@ public virtual ReferenceNavigationBuilder HasOne( } /// - /// - /// Configures a relationship where this entity type has a reference that points - /// to a single instance of the other type in the relationship. - /// - /// - /// After calling this method, you should chain a call to - /// - /// or to fully configure - /// the relationship. Calling just this method without the chained call will not - /// produce a valid relationship. - /// + /// Configures a relationship where this entity type has a reference that points + /// to a single instance of the other type in the relationship. /// + /// + /// After calling this method, you should chain a call to + /// + /// or to fully configure + /// the relationship. Calling just this method without the chained call will not + /// produce a valid relationship. + /// /// /// The name of the reference navigation property on this entity type that represents /// the relationship. The navigation must be a CLR property on the entity type. @@ -854,17 +838,15 @@ protected virtual ForeignKey HasOneBuilder( } /// - /// - /// Configures a relationship where this entity type has a collection that contains - /// instances of the other type in the relationship. - /// - /// - /// After calling this method, you should chain a call to - /// - /// to fully configure the relationship. Calling just this method without the chained call will not - /// produce a valid relationship. - /// + /// Configures a relationship where this entity type has a collection that contains + /// instances of the other type in the relationship. /// + /// + /// After calling this method, you should chain a call to + /// + /// to fully configure the relationship. Calling just this method without the chained call will not + /// produce a valid relationship. + /// /// The name of the entity type that this relationship targets. /// /// The name of the collection navigation property on this entity type that represents the relationship. If @@ -885,17 +867,15 @@ public virtual CollectionNavigationBuilder HasMany( } /// - /// - /// Configures a relationship where this entity type has a collection that contains - /// instances of the other type in the relationship. - /// - /// - /// After calling this method, you should chain a call to - /// - /// to fully configure the relationship. Calling just this method without the chained call will not - /// produce a valid relationship. - /// + /// Configures a relationship where this entity type has a collection that contains + /// instances of the other type in the relationship. /// + /// + /// After calling this method, you should chain a call to + /// + /// to fully configure the relationship. Calling just this method without the chained call will not + /// produce a valid relationship. + /// /// /// The name of the collection navigation property on this entity type that represents the relationship. /// The navigation must be a CLR property on the entity type. @@ -922,10 +902,10 @@ public virtual CollectionNavigationBuilder HasMany(string navigationName) } /// - /// - /// Configures a relationship where this entity type has a collection that contains - /// instances of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a collection that contains + /// instances of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -937,7 +917,7 @@ public virtual CollectionNavigationBuilder HasMany(string navigationName) /// to fully configure the relationship. Calling just this method without the chained call will not /// produce a valid relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the collection navigation property on this entity type that represents the relationship. If @@ -1023,9 +1003,9 @@ public virtual EntityTypeBuilder HasChangeTrackingStrategy(ChangeTrackingStrateg } /// - /// - /// Sets the to use for all properties of this entity type. - /// + /// Sets the to use for all properties of this entity type. + /// + /// /// /// By default, the backing field, if one is found by convention or has been specified, is used when /// new objects are constructed, typically when entities are queried from the database. @@ -1036,7 +1016,7 @@ public virtual EntityTypeBuilder HasChangeTrackingStrategy(ChangeTrackingStrateg /// Calling this method overrides for all properties of this entity type any access mode that was /// set on the model. /// - /// + /// /// The to use for properties of this entity type. /// The same builder instance so that multiple configuration calls can be chained. public virtual EntityTypeBuilder UsePropertyAccessMode(PropertyAccessMode propertyAccessMode) diff --git a/src/EFCore/Metadata/Builders/EntityTypeBuilder`.cs b/src/EFCore/Metadata/Builders/EntityTypeBuilder`.cs index 876dab571ce..5075317add3 100644 --- a/src/EFCore/Metadata/Builders/EntityTypeBuilder`.cs +++ b/src/EFCore/Metadata/Builders/EntityTypeBuilder`.cs @@ -13,15 +13,13 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring an . - /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Provides a simple API for configuring an . /// /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. + /// + /// /// See Modeling entity types and relationships for more information. /// /// The entity type being configured. @@ -326,9 +324,9 @@ public virtual IndexBuilder HasIndex( ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -341,7 +339,7 @@ public virtual IndexBuilder HasIndex( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -355,9 +353,9 @@ public virtual OwnedNavigationBuilder OwnsOne - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -370,7 +368,7 @@ public virtual OwnedNavigationBuilder OwnsOne to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -386,9 +384,9 @@ public virtual OwnedNavigationBuilder OwnsOne - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -401,7 +399,7 @@ public virtual OwnedNavigationBuilder OwnsOne to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// A lambda expression representing the reference navigation property on this entity type that represents @@ -416,9 +414,9 @@ public virtual OwnedNavigationBuilder OwnsOne - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -431,7 +429,7 @@ public virtual OwnedNavigationBuilder OwnsOne to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -448,9 +446,9 @@ public virtual OwnedNavigationBuilder OwnsOne - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -463,7 +461,7 @@ public virtual OwnedNavigationBuilder OwnsOne to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -485,9 +483,9 @@ public virtual EntityTypeBuilder OwnsOne( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -500,7 +498,7 @@ public virtual EntityTypeBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -514,9 +512,9 @@ public virtual EntityTypeBuilder OwnsOne( => (EntityTypeBuilder)base.OwnsOne(ownedTypeName, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -529,7 +527,7 @@ public virtual EntityTypeBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -543,9 +541,9 @@ public virtual EntityTypeBuilder OwnsOne( => (EntityTypeBuilder)base.OwnsOne(ownedType, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -558,7 +556,7 @@ public virtual EntityTypeBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -574,9 +572,9 @@ public virtual EntityTypeBuilder OwnsOne( => (EntityTypeBuilder)base.OwnsOne(ownedTypeName, ownedType, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -589,7 +587,7 @@ public virtual EntityTypeBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -614,9 +612,9 @@ public virtual EntityTypeBuilder OwnsOne( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -629,7 +627,7 @@ public virtual EntityTypeBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// A lambda expression representing the reference navigation property on this entity type that represents @@ -653,9 +651,9 @@ public virtual EntityTypeBuilder OwnsOne( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -668,7 +666,7 @@ public virtual EntityTypeBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -710,9 +708,9 @@ private OwnedNavigationBuilder OwnsOneBuilder - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -725,7 +723,7 @@ private OwnedNavigationBuilder OwnsOneBuilder to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -739,9 +737,9 @@ public virtual OwnedNavigationBuilder OwnsMany - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -754,7 +752,7 @@ public virtual OwnedNavigationBuilder OwnsMany to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -770,9 +768,9 @@ public virtual OwnedNavigationBuilder OwnsMany - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -785,7 +783,7 @@ public virtual OwnedNavigationBuilder OwnsMany to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// A lambda expression representing the reference navigation property on this entity type that represents @@ -800,9 +798,9 @@ public virtual OwnedNavigationBuilder OwnsMany - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -815,7 +813,7 @@ public virtual OwnedNavigationBuilder OwnsMany to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -832,9 +830,9 @@ public virtual OwnedNavigationBuilder OwnsMany - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -847,7 +845,7 @@ public virtual OwnedNavigationBuilder OwnsMany to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -869,9 +867,9 @@ public virtual EntityTypeBuilder OwnsMany( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -884,7 +882,7 @@ public virtual EntityTypeBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -898,9 +896,9 @@ public virtual EntityTypeBuilder OwnsMany( => (EntityTypeBuilder)base.OwnsMany(ownedTypeName, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -913,7 +911,7 @@ public virtual EntityTypeBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -927,9 +925,9 @@ public virtual EntityTypeBuilder OwnsMany( => (EntityTypeBuilder)base.OwnsMany(ownedType, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -942,7 +940,7 @@ public virtual EntityTypeBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -958,9 +956,9 @@ public virtual EntityTypeBuilder OwnsMany( => (EntityTypeBuilder)base.OwnsMany(ownedTypeName, ownedType, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -973,7 +971,7 @@ public virtual EntityTypeBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -998,9 +996,9 @@ public virtual EntityTypeBuilder OwnsMany( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -1013,7 +1011,7 @@ public virtual EntityTypeBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// A lambda expression representing the reference navigation property on this entity type that represents @@ -1037,9 +1035,9 @@ public virtual EntityTypeBuilder OwnsMany( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -1052,7 +1050,7 @@ public virtual EntityTypeBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -1095,10 +1093,10 @@ private OwnedNavigationBuilder OwnsManyBuilder - /// - /// Configures a relationship where this entity type has a reference that points - /// to a single instance of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a reference that points + /// to a single instance of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -1112,7 +1110,7 @@ private OwnedNavigationBuilder OwnsManyBuilder - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. If @@ -1136,10 +1134,10 @@ public virtual ReferenceNavigationBuilder HasOne - /// - /// Configures a relationship where this entity type has a reference that points - /// to a single instance of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a reference that points + /// to a single instance of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -1155,7 +1153,7 @@ public virtual ReferenceNavigationBuilder HasOne - /// + /// /// The entity type that this relationship targets. /// /// A lambda expression representing the reference navigation property on this entity type that represents @@ -1180,10 +1178,10 @@ public virtual ReferenceNavigationBuilder HasOne - /// - /// Configures a relationship where this entity type has a collection that contains - /// instances of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a collection that contains + /// instances of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -1196,7 +1194,7 @@ public virtual ReferenceNavigationBuilder HasOne - /// + /// /// The entity type that this relationship targets. /// /// The name of the collection navigation property on this entity type that represents the relationship. If @@ -1235,10 +1233,10 @@ public virtual CollectionNavigationBuilder HasMany - /// - /// Configures a relationship where this entity type has a collection that contains - /// instances of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a collection that contains + /// instances of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -1251,7 +1249,7 @@ public virtual CollectionNavigationBuilder HasMany - /// + /// /// The entity type that this relationship targets. /// /// A lambda expression representing the collection navigation property on this entity type that represents @@ -1298,9 +1296,9 @@ public virtual CollectionNavigationBuilder HasMany (EntityTypeBuilder)base.HasChangeTrackingStrategy(changeTrackingStrategy); /// - /// - /// Sets the to use for all properties of this entity type. - /// + /// Sets the to use for all properties of this entity type. + /// + /// /// /// By default, the backing field, if one is found by convention or has been specified, is used when /// new objects are constructed, typically when entities are queried from the database. @@ -1311,7 +1309,7 @@ public virtual CollectionNavigationBuilder HasMany - /// + /// /// The to use for properties of this entity type. /// The same builder instance so that multiple configuration calls can be chained. public new virtual EntityTypeBuilder UsePropertyAccessMode(PropertyAccessMode propertyAccessMode) diff --git a/src/EFCore/Metadata/Builders/IConventionModelBuilder.cs b/src/EFCore/Metadata/Builders/IConventionModelBuilder.cs index a6ad10aab01..f10c72508aa 100644 --- a/src/EFCore/Metadata/Builders/IConventionModelBuilder.cs +++ b/src/EFCore/Metadata/Builders/IConventionModelBuilder.cs @@ -42,9 +42,9 @@ public interface IConventionModelBuilder : IConventionAnnotatableBuilder IConventionEntityTypeBuilder? Entity(string name, bool? shouldBeOwned = false, bool fromDataAnnotation = false); /// - /// - /// Returns an object that can be used to configure a given shared type entity type in the model. - /// + /// Returns an object that can be used to configure a given shared type entity type in the model. + /// + /// /// /// If an entity type with the provided name is not already part of the model, a new entity type with provided CLR /// type will be added to the model as shared type entity type. @@ -53,7 +53,7 @@ public interface IConventionModelBuilder : IConventionAnnotatableBuilder /// Shared type entity type is an entity type which can share CLR type with other types in the model but has /// a unique name and always identified by the name. /// - /// + /// /// The name of the entity type to be configured. /// The type of the entity type to be configured. /// @@ -221,16 +221,14 @@ public interface IConventionModelBuilder : IConventionAnnotatableBuilder bool CanSetChangeTrackingStrategy(ChangeTrackingStrategy? changeTrackingStrategy, bool fromDataAnnotation = false); /// - /// - /// Sets the to use for all properties of this entity type. - /// - /// - /// By default, the backing field, if one is found by convention or has been specified, is used when - /// new objects are constructed, typically when entities are queried from the database. - /// Properties are used for all other accesses. Calling this method will change that behavior - /// for all properties in the model as described in the enum. - /// + /// Sets the to use for all properties of this entity type. /// + /// + /// By default, the backing field, if one is found by convention or has been specified, is used when + /// new objects are constructed, typically when entities are queried from the database. + /// Properties are used for all other accesses. Calling this method will change that behavior + /// for all properties in the model as described in the enum. + /// /// The to use for properties of this model. /// Indicates whether the configuration was specified using a data annotation. /// diff --git a/src/EFCore/Metadata/Builders/IndexBuilder.cs b/src/EFCore/Metadata/Builders/IndexBuilder.cs index ac97326cf5b..7fc8402b7e0 100644 --- a/src/EFCore/Metadata/Builders/IndexBuilder.cs +++ b/src/EFCore/Metadata/Builders/IndexBuilder.cs @@ -9,16 +9,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring an . - /// + /// Provides a simple API for configuring an . + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class IndexBuilder : IInfrastructure { diff --git a/src/EFCore/Metadata/Builders/IndexBuilder`.cs b/src/EFCore/Metadata/Builders/IndexBuilder`.cs index fcde10c5033..60bc8062517 100644 --- a/src/EFCore/Metadata/Builders/IndexBuilder`.cs +++ b/src/EFCore/Metadata/Builders/IndexBuilder`.cs @@ -6,16 +6,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring an . - /// + /// Provides a simple API for configuring an . + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// // ReSharper disable once UnusedTypeParameter public class IndexBuilder : IndexBuilder diff --git a/src/EFCore/Metadata/Builders/KeyBuilder.cs b/src/EFCore/Metadata/Builders/KeyBuilder.cs index c1a94525c0a..ec7aa83d249 100644 --- a/src/EFCore/Metadata/Builders/KeyBuilder.cs +++ b/src/EFCore/Metadata/Builders/KeyBuilder.cs @@ -9,16 +9,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a . - /// + /// Provides a simple API for configuring a . + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class KeyBuilder : IInfrastructure { diff --git a/src/EFCore/Metadata/Builders/KeyBuilder`.cs b/src/EFCore/Metadata/Builders/KeyBuilder`.cs index 490608d52b0..ffe90998f5c 100644 --- a/src/EFCore/Metadata/Builders/KeyBuilder`.cs +++ b/src/EFCore/Metadata/Builders/KeyBuilder`.cs @@ -6,16 +6,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a . - /// + /// Provides a simple API for configuring a . + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// // ReSharper disable once UnusedTypeParameter public class KeyBuilder : KeyBuilder diff --git a/src/EFCore/Metadata/Builders/NavigationBuilder.cs b/src/EFCore/Metadata/Builders/NavigationBuilder.cs index 8605f5f69aa..8d370922227 100644 --- a/src/EFCore/Metadata/Builders/NavigationBuilder.cs +++ b/src/EFCore/Metadata/Builders/NavigationBuilder.cs @@ -11,16 +11,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a or . - /// + /// Provides a simple API for configuring a or . + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class NavigationBuilder : IInfrastructure, IInfrastructure { @@ -78,9 +78,9 @@ public virtual NavigationBuilder HasAnnotation(string annotation, object? value) } /// - /// - /// Sets the to use for this property. - /// + /// Sets the to use for this property. + /// + /// /// /// By default, the backing field, if one is found by convention or has been specified, is used when /// new objects are constructed, typically when entities are queried from the database. @@ -91,7 +91,7 @@ public virtual NavigationBuilder HasAnnotation(string annotation, object? value) /// Calling this method overrides for this property any access mode that was set on the /// entity type or model. /// - /// + /// /// The to use for this property. /// The same builder instance so that multiple configuration calls can be chained. public virtual NavigationBuilder UsePropertyAccessMode(PropertyAccessMode propertyAccessMode) diff --git a/src/EFCore/Metadata/Builders/NavigationBuilder`.cs b/src/EFCore/Metadata/Builders/NavigationBuilder`.cs index 8ff3703adea..7edc41b44b4 100644 --- a/src/EFCore/Metadata/Builders/NavigationBuilder`.cs +++ b/src/EFCore/Metadata/Builders/NavigationBuilder`.cs @@ -7,16 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a or a . - /// + /// Provides a simple API for configuring a or a . + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class NavigationBuilder : NavigationBuilder where TSource : class @@ -46,9 +46,9 @@ public NavigationBuilder(IMutableNavigationBase navigationOrSkipNavigation) => (NavigationBuilder)base.HasAnnotation(annotation, value); /// - /// - /// Sets the to use for this property. - /// + /// Sets the to use for this property. + /// + /// /// /// By default, the backing field, if one is found by convention or has been specified, is used when /// new objects are constructed, typically when entities are queried from the database. @@ -59,7 +59,7 @@ public NavigationBuilder(IMutableNavigationBase navigationOrSkipNavigation) /// Calling this method overrides for this property any access mode that was set on the /// entity type or model. /// - /// + /// /// The to use for this property. /// The same builder instance so that multiple configuration calls can be chained. public new virtual NavigationBuilder UsePropertyAccessMode(PropertyAccessMode propertyAccessMode) diff --git a/src/EFCore/Metadata/Builders/OwnedEntityTypeBuilder.cs b/src/EFCore/Metadata/Builders/OwnedEntityTypeBuilder.cs index 2b1c68ca0d5..39f238b7b4b 100644 --- a/src/EFCore/Metadata/Builders/OwnedEntityTypeBuilder.cs +++ b/src/EFCore/Metadata/Builders/OwnedEntityTypeBuilder.cs @@ -7,10 +7,8 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. /// /// /// See Modeling entity types and relationships for more information. diff --git a/src/EFCore/Metadata/Builders/OwnedEntityTypeBuilder`.cs b/src/EFCore/Metadata/Builders/OwnedEntityTypeBuilder`.cs index 698889d8bdd..8c0d4c792ae 100644 --- a/src/EFCore/Metadata/Builders/OwnedEntityTypeBuilder`.cs +++ b/src/EFCore/Metadata/Builders/OwnedEntityTypeBuilder`.cs @@ -6,10 +6,8 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. /// /// /// See Modeling entity types and relationships for more information. diff --git a/src/EFCore/Metadata/Builders/OwnedNavigationBuilder.cs b/src/EFCore/Metadata/Builders/OwnedNavigationBuilder.cs index 4852d169d97..5467f968a59 100644 --- a/src/EFCore/Metadata/Builders/OwnedNavigationBuilder.cs +++ b/src/EFCore/Metadata/Builders/OwnedNavigationBuilder.cs @@ -138,16 +138,14 @@ public virtual KeyBuilder HasKey(params string[] propertyNames) Check.NotEmpty(propertyNames, nameof(propertyNames)), ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Returns an object that can be used to configure a property of the owned entity type. - /// If no property with the given name exists, then a new property will be added. - /// - /// - /// When adding a new property with this overload the property name must match the - /// name of a CLR property or field on the entity type. This overload cannot be used to - /// add a new shadow state property. - /// - /// + /// Returns an object that can be used to configure a property of the owned entity type. + /// If no property with the given name exists, then a new property will be added. + /// + /// + /// When adding a new property with this overload the property name must match the + /// name of a CLR property or field on the entity type. This overload cannot be used to + /// add a new shadow state property. + /// /// The name of the property to be configured. /// An object that can be used to configure the property. public virtual PropertyBuilder Property(string propertyName) @@ -158,18 +156,16 @@ public virtual PropertyBuilder Property(string propertyName) ConfigurationSource.Explicit)!.Metadata)); /// - /// - /// Returns an object that can be used to configure a property of the owned entity type. - /// If no property with the given name exists, then a new property will be added. - /// - /// - /// When adding a new property, if a property with the same name exists in the entity class - /// then it will be added to the model. If no property exists in the entity class, then - /// a new shadow state property will be added. A shadow state property is one that does not have a - /// corresponding property in the entity class. The current value for the property is stored in - /// the rather than being stored in instances of the entity class. - /// + /// Returns an object that can be used to configure a property of the owned entity type. + /// If no property with the given name exists, then a new property will be added. /// + /// + /// When adding a new property, if a property with the same name exists in the entity class + /// then it will be added to the model. If no property exists in the entity class, then + /// a new shadow state property will be added. A shadow state property is one that does not have a + /// corresponding property in the entity class. The current value for the property is stored in + /// the rather than being stored in instances of the entity class. + /// /// The type of the property to be configured. /// The name of the property to be configured. /// An object that can be used to configure the property. @@ -181,18 +177,16 @@ public virtual PropertyBuilder Property(string propertyNam Check.NotEmpty(propertyName, nameof(propertyName)), ConfigurationSource.Explicit)!.Metadata)); /// - /// - /// Returns an object that can be used to configure a property of the owned entity type. - /// If no property with the given name exists, then a new property will be added. - /// - /// - /// When adding a new property, if a property with the same name exists in the entity class - /// then it will be added to the model. If no property exists in the entity class, then - /// a new shadow state property will be added. A shadow state property is one that does not have a - /// corresponding property in the entity class. The current value for the property is stored in - /// the rather than being stored in instances of the entity class. - /// + /// Returns an object that can be used to configure a property of the owned entity type. + /// If no property with the given name exists, then a new property will be added. /// + /// + /// When adding a new property, if a property with the same name exists in the entity class + /// then it will be added to the model. If no property exists in the entity class, then + /// a new shadow state property will be added. A shadow state property is one that does not have a + /// corresponding property in the entity class. The current value for the property is stored in + /// the rather than being stored in instances of the entity class. + /// /// The type of the property to be configured. /// The name of the property to be configured. /// An object that can be used to configure the property. @@ -203,16 +197,14 @@ public virtual PropertyBuilder Property(Type propertyType, string propertyName) Check.NotEmpty(propertyName, nameof(propertyName)), ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Returns an object that can be used to configure a property of the entity type. - /// If no property with the given name exists, then a new property will be added. - /// - /// - /// Indexer properties are stored in the entity using - /// an indexer - /// supplying the provided property name. - /// + /// Returns an object that can be used to configure a property of the entity type. + /// If no property with the given name exists, then a new property will be added. /// + /// + /// Indexer properties are stored in the entity using + /// an indexer + /// supplying the provided property name. + /// /// The type of the property to be configured. /// The name of the property to be configured. /// An object that can be used to configure the property. @@ -223,16 +215,14 @@ public virtual PropertyBuilder IndexerProperty(string prop Check.NotEmpty(propertyName, nameof(propertyName)), ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Returns an object that can be used to configure a property of the entity type. - /// If no property with the given name exists, then a new property will be added. - /// - /// - /// Indexer properties are stored in the entity using - /// an indexer - /// supplying the provided property name. - /// + /// Returns an object that can be used to configure a property of the entity type. + /// If no property with the given name exists, then a new property will be added. /// + /// + /// Indexer properties are stored in the entity using + /// an indexer + /// supplying the provided property name. + /// /// The type of the property to be configured. /// The name of the property to be configured. /// An object that can be used to configure the property. @@ -243,11 +233,9 @@ public virtual PropertyBuilder IndexerProperty(Type propertyType, string propert Check.NotEmpty(propertyName, nameof(propertyName)), ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Returns an object that can be used to configure an existing navigation property - /// from the owned type to its owner. It is an error for the navigation property - /// not to exist. - /// + /// Returns an object that can be used to configure an existing navigation property + /// from the owned type to its owner. It is an error for the navigation property + /// not to exist. /// /// The name of the navigation property to be configured. /// An object that can be used to configure the navigation property. @@ -282,15 +270,13 @@ public virtual IndexBuilder HasIndex(params string[] propertyNames) Check.NotEmpty(propertyNames, nameof(propertyNames)), ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Configures the relationship to the owner. - /// - /// - /// Note that calling this method with no parameters will explicitly configure this side - /// of the relationship to use no navigation property, even if such a property exists on the - /// entity type. If the navigation property is to be used, then it must be specified. - /// + /// Configures the relationship to the owner. /// + /// + /// Note that calling this method with no parameters will explicitly configure this side + /// of the relationship to use no navigation property, even if such a property exists on the + /// entity type. If the navigation property is to be used, then it must be specified. + /// /// /// The name of the reference navigation property pointing to the owner. /// If null or not specified, there is no navigation property pointing to the owner. @@ -311,10 +297,10 @@ public virtual OwnershipBuilder WithOwner( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -327,7 +313,7 @@ public virtual OwnershipBuilder WithOwner( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -341,10 +327,10 @@ public virtual OwnedNavigationBuilder OwnsOne( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -357,7 +343,7 @@ public virtual OwnedNavigationBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -373,10 +359,10 @@ public virtual OwnedNavigationBuilder OwnsOne( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -389,7 +375,7 @@ public virtual OwnedNavigationBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -403,10 +389,10 @@ public virtual OwnedNavigationBuilder OwnsOne( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -419,7 +405,7 @@ public virtual OwnedNavigationBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -443,10 +429,10 @@ public virtual OwnedNavigationBuilder OwnsOne( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -459,7 +445,7 @@ public virtual OwnedNavigationBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -486,10 +472,10 @@ public virtual OwnedNavigationBuilder OwnsOne( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -502,7 +488,7 @@ public virtual OwnedNavigationBuilder OwnsOne( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -540,9 +526,9 @@ private OwnedNavigationBuilder OwnsOneBuilder(in TypeIdentity ownedType, string } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -555,7 +541,7 @@ private OwnedNavigationBuilder OwnsOneBuilder(in TypeIdentity ownedType, string /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -569,9 +555,9 @@ public virtual OwnedNavigationBuilder OwnsMany( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -584,7 +570,7 @@ public virtual OwnedNavigationBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -600,9 +586,9 @@ public virtual OwnedNavigationBuilder OwnsMany( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -615,7 +601,7 @@ public virtual OwnedNavigationBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -629,9 +615,9 @@ public virtual OwnedNavigationBuilder OwnsMany( Check.NotEmpty(navigationName, nameof(navigationName))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -644,7 +630,7 @@ public virtual OwnedNavigationBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -668,9 +654,9 @@ public virtual OwnedNavigationBuilder OwnsMany( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -683,7 +669,7 @@ public virtual OwnedNavigationBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -710,9 +696,9 @@ public virtual OwnedNavigationBuilder OwnsMany( } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -725,7 +711,7 @@ public virtual OwnedNavigationBuilder OwnsMany( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -763,10 +749,10 @@ private OwnedNavigationBuilder OwnsManyBuilder(in TypeIdentity ownedType, string } /// - /// - /// Configures a relationship where this entity type has a reference that points - /// to a single instance of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a reference that points + /// to a single instance of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -779,7 +765,7 @@ private OwnedNavigationBuilder OwnsManyBuilder(in TypeIdentity ownedType, string /// the relationship. Calling just this method without the chained call will not /// produce a valid relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. If @@ -806,10 +792,10 @@ public virtual ReferenceNavigationBuilder HasOne( } /// - /// - /// Configures a relationship where this entity type has a reference that points - /// to a single instance of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a reference that points + /// to a single instance of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -822,7 +808,7 @@ public virtual ReferenceNavigationBuilder HasOne( /// the relationship. Calling just this method without the chained call will not /// produce a valid relationship. /// - /// + /// /// /// The name of the reference navigation property on this entity type that represents the relationship. /// @@ -837,10 +823,10 @@ public virtual ReferenceNavigationBuilder HasOne(string navigationName) } /// - /// - /// Configures a relationship where this entity type has a reference that points - /// to a single instance of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a reference that points + /// to a single instance of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -853,7 +839,7 @@ public virtual ReferenceNavigationBuilder HasOne(string navigationName) /// the relationship. Calling just this method without the chained call will not /// produce a valid relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. If @@ -957,9 +943,9 @@ public virtual OwnedNavigationBuilder HasChangeTrackingStrategy(ChangeTrackingSt } /// - /// - /// Sets the to use for all properties of this entity type. - /// + /// Sets the to use for all properties of this entity type. + /// + /// /// /// By default, the backing field, if one is found by convention or has been specified, is used when /// new objects are constructed, typically when entities are queried from the database. @@ -970,7 +956,7 @@ public virtual OwnedNavigationBuilder HasChangeTrackingStrategy(ChangeTrackingSt /// Calling this method overrides for all properties of this entity type any access mode that was /// set on the model. /// - /// + /// /// The to use for properties of this entity type. /// The same builder instance so that multiple configuration calls can be chained. public virtual OwnedNavigationBuilder UsePropertyAccessMode(PropertyAccessMode propertyAccessMode) diff --git a/src/EFCore/Metadata/Builders/OwnedNavigationBuilder`.cs b/src/EFCore/Metadata/Builders/OwnedNavigationBuilder`.cs index cc818fcae8b..c84c9858f6c 100644 --- a/src/EFCore/Metadata/Builders/OwnedNavigationBuilder`.cs +++ b/src/EFCore/Metadata/Builders/OwnedNavigationBuilder`.cs @@ -75,18 +75,16 @@ public virtual KeyBuilder HasKey(Expression - /// - /// Returns an object that can be used to configure a property of the owned entity type. - /// If no property with the given name exists, then a new property will be added. - /// - /// - /// When adding a new property, if a property with the same name exists in the entity class - /// then it will be added to the model. If no property exists in the entity class, then - /// a new shadow state property will be added. A shadow state property is one that does not have a - /// corresponding property in the entity class. The current value for the property is stored in - /// the rather than being stored in instances of the entity class. - /// + /// Returns an object that can be used to configure a property of the owned entity type. + /// If no property with the given name exists, then a new property will be added. /// + /// + /// When adding a new property, if a property with the same name exists in the entity class + /// then it will be added to the model. If no property exists in the entity class, then + /// a new shadow state property will be added. A shadow state property is one that does not have a + /// corresponding property in the entity class. The current value for the property is stored in + /// the rather than being stored in instances of the entity class. + /// /// The type of the property to be configured. /// /// A lambda expression representing the property to be configured ( @@ -102,11 +100,9 @@ public virtual PropertyBuilder Property( ConfigurationSource.Explicit)!.Metadata)); /// - /// - /// Returns an object that can be used to configure an existing navigation property - /// from the owned type to its owner. It is an error for the navigation property - /// not to exist. - /// + /// Returns an object that can be used to configure an existing navigation property + /// from the owned type to its owner. It is an error for the navigation property + /// not to exist. /// /// The target entity type. /// @@ -122,11 +118,9 @@ public virtual NavigationBuilder Navigation - /// - /// Returns an object that can be used to configure an existing navigation property - /// from the owned type to its owner. It is an error for the navigation property - /// not to exist. - /// + /// Returns an object that can be used to configure an existing navigation property + /// from the owned type to its owner. It is an error for the navigation property + /// not to exist. /// /// The target entity type. /// @@ -197,15 +191,13 @@ public virtual IndexBuilder HasIndex(Expression - /// - /// Configures the relationship to the owner. - /// - /// - /// Note that calling this method with no parameters will explicitly configure this side - /// of the relationship to use no navigation property, even if such a property exists on the - /// entity type. If the navigation property is to be used, then it must be specified. - /// + /// Configures the relationship to the owner. /// + /// + /// Note that calling this method with no parameters will explicitly configure this side + /// of the relationship to use no navigation property, even if such a property exists on the + /// entity type. If the navigation property is to be used, then it must be specified. + /// /// /// The name of the reference navigation property pointing to the owner. /// If null or not specified, there is no navigation property pointing to the owner. @@ -226,15 +218,13 @@ public virtual IndexBuilder HasIndex(Expression - /// - /// Configures the relationship to the owner. - /// - /// - /// Note that calling this method with no parameters will explicitly configure this side - /// of the relationship to use no navigation property, even if such a property exists on the - /// entity type. If the navigation property is to be used, then it must be specified. - /// + /// Configures the relationship to the owner. /// + /// + /// Note that calling this method with no parameters will explicitly configure this side + /// of the relationship to use no navigation property, even if such a property exists on the + /// entity type. If the navigation property is to be used, then it must be specified. + /// /// /// A lambda expression representing the reference navigation property pointing to the owner /// (blog => blog.BlogInfo). If no property is specified, the relationship will be @@ -252,10 +242,10 @@ public virtual OwnershipBuilder WithOwner( ConfigurationSource.Explicit)!.Metadata); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -268,7 +258,7 @@ public virtual OwnershipBuilder WithOwner( /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -282,10 +272,10 @@ public virtual OwnedNavigationBuilder Own new MemberIdentity(Check.NotEmpty(navigationName, nameof(navigationName)))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -298,7 +288,7 @@ public virtual OwnedNavigationBuilder Own /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -314,10 +304,10 @@ public virtual OwnedNavigationBuilder Own new MemberIdentity(Check.NotEmpty(navigationName, nameof(navigationName)))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -330,7 +320,7 @@ public virtual OwnedNavigationBuilder Own /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// A lambda expression representing the reference navigation property on this entity type that represents @@ -345,10 +335,10 @@ public virtual OwnedNavigationBuilder Own new MemberIdentity(Check.NotNull(navigationExpression, nameof(navigationExpression)).GetMemberAccess())); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -361,7 +351,7 @@ public virtual OwnedNavigationBuilder Own /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -378,10 +368,10 @@ public virtual OwnedNavigationBuilder Own new MemberIdentity(Check.NotNull(navigationExpression, nameof(navigationExpression)).GetMemberAccess())); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -394,7 +384,7 @@ public virtual OwnedNavigationBuilder Own /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -417,10 +407,10 @@ public virtual OwnedNavigationBuilder OwnsOne - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -433,7 +423,7 @@ public virtual OwnedNavigationBuilder OwnsOne to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -447,10 +437,10 @@ public virtual OwnedNavigationBuilder OwnsOne (OwnedNavigationBuilder)base.OwnsOne(ownedTypeName, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -463,7 +453,7 @@ public virtual OwnedNavigationBuilder OwnsOne to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -479,10 +469,10 @@ public virtual OwnedNavigationBuilder OwnsOne (OwnedNavigationBuilder)base.OwnsOne(ownedTypeName, ownedType, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -495,7 +485,7 @@ public virtual OwnedNavigationBuilder OwnsOne to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -509,10 +499,10 @@ public virtual OwnedNavigationBuilder OwnsOne (OwnedNavigationBuilder)base.OwnsOne(ownedType, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -525,7 +515,7 @@ public virtual OwnedNavigationBuilder OwnsOne to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -550,10 +540,10 @@ public virtual OwnedNavigationBuilder OwnsOne - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -566,7 +556,7 @@ public virtual OwnedNavigationBuilder OwnsOne to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// A lambda expression representing the reference navigation property on this entity type that represents @@ -590,10 +580,10 @@ public virtual OwnedNavigationBuilder OwnsOne - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// The target entity key value is always propagated from the entity it belongs to. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// The target entity key value is always propagated from the entity it belongs to. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -606,7 +596,7 @@ public virtual OwnedNavigationBuilder OwnsOne to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -649,9 +639,9 @@ private OwnedNavigationBuilder OwnsOneBui } /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -664,7 +654,7 @@ private OwnedNavigationBuilder OwnsOneBui /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -678,9 +668,9 @@ public virtual OwnedNavigationBuilder Own new MemberIdentity(Check.NotEmpty(navigationName, nameof(navigationName)))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -693,7 +683,7 @@ public virtual OwnedNavigationBuilder Own /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -709,9 +699,9 @@ public virtual OwnedNavigationBuilder Own new MemberIdentity(Check.NotEmpty(navigationName, nameof(navigationName)))); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -724,7 +714,7 @@ public virtual OwnedNavigationBuilder Own /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// A lambda expression representing the reference navigation property on this entity type that represents @@ -739,9 +729,9 @@ public virtual OwnedNavigationBuilder Own new MemberIdentity(Check.NotNull(navigationExpression, nameof(navigationExpression)).GetMemberAccess())); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -754,7 +744,7 @@ public virtual OwnedNavigationBuilder Own /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -771,9 +761,9 @@ public virtual OwnedNavigationBuilder Own new MemberIdentity(Check.NotNull(navigationExpression, nameof(navigationExpression)).GetMemberAccess())); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -786,7 +776,7 @@ public virtual OwnedNavigationBuilder Own /// After calling this method, you should chain a call to /// to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -812,9 +802,9 @@ public virtual OwnedNavigationBuilder OwnsMany - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -827,7 +817,7 @@ public virtual OwnedNavigationBuilder OwnsMany to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -841,9 +831,9 @@ public virtual OwnedNavigationBuilder OwnsMany (OwnedNavigationBuilder)base.OwnsMany(ownedTypeName, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -856,7 +846,7 @@ public virtual OwnedNavigationBuilder OwnsMany to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. @@ -870,9 +860,9 @@ public virtual OwnedNavigationBuilder OwnsMany (OwnedNavigationBuilder)base.OwnsMany(ownedType, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -885,7 +875,7 @@ public virtual OwnedNavigationBuilder OwnsMany to fully configure the relationship. /// - /// + /// /// The name of the entity type that this relationship targets. /// The CLR type of the entity type that this relationship targets. /// @@ -901,9 +891,9 @@ public virtual OwnedNavigationBuilder OwnsMany (OwnedNavigationBuilder)base.OwnsMany(ownedTypeName, ownedType, navigationName, buildAction); /// - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -916,7 +906,7 @@ public virtual OwnedNavigationBuilder OwnsMany to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -944,9 +934,9 @@ public virtual OwnedNavigationBuilder OwnsMany - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -959,7 +949,7 @@ public virtual OwnedNavigationBuilder OwnsMany to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// A lambda expression representing the reference navigation property on this entity type that represents @@ -986,9 +976,9 @@ public virtual OwnedNavigationBuilder OwnsMany - /// - /// Configures a relationship where the target entity is owned by (or part of) this entity. - /// + /// Configures a relationship where the target entity is owned by (or part of) this entity. + /// + /// /// /// The target entity type for each ownership relationship is treated as a different entity type /// even if the navigation is of the same type. Configuration of the target entity type @@ -1001,7 +991,7 @@ public virtual OwnedNavigationBuilder OwnsMany to fully configure the relationship. /// - /// + /// /// The entity type that this relationship targets. /// The name of the entity type that this relationship targets. /// @@ -1047,10 +1037,10 @@ private OwnedNavigationBuilder OwnsManyBuil } /// - /// - /// Configures a relationship where this entity type has a reference that points - /// to a single instance of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a reference that points + /// to a single instance of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -1064,7 +1054,7 @@ private OwnedNavigationBuilder OwnsManyBuil /// to fully configure the relationship. Calling just this method without the chained call will not /// produce a valid relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// The name of the reference navigation property on this entity type that represents the relationship. If @@ -1088,10 +1078,10 @@ public virtual ReferenceNavigationBuilder H } /// - /// - /// Configures a relationship where this entity type has a reference that points - /// to a single instance of the other type in the relationship. - /// + /// Configures a relationship where this entity type has a reference that points + /// to a single instance of the other type in the relationship. + /// + /// /// /// Note that calling this method with no parameters will explicitly configure this side /// of the relationship to use no navigation property, even if such a property exists on the @@ -1107,7 +1097,7 @@ public virtual ReferenceNavigationBuilder H /// to fully configure the relationship. Calling just this method without the chained call will not /// produce a valid relationship. /// - /// + /// /// The entity type that this relationship targets. /// /// A lambda expression representing the reference navigation property on this entity type that represents @@ -1142,9 +1132,9 @@ public virtual ReferenceNavigationBuilder H => (OwnedNavigationBuilder)base.HasChangeTrackingStrategy(changeTrackingStrategy); /// - /// - /// Sets the to use for all properties of this entity type. - /// + /// Sets the to use for all properties of this entity type. + /// + /// /// /// By default, the backing field, if one is found by convention or has been specified, is used when /// new objects are constructed, typically when entities are queried from the database. @@ -1155,7 +1145,7 @@ public virtual ReferenceNavigationBuilder H /// Calling this method overrides for all properties of this entity type any access mode that was /// set on the model. /// - /// + /// /// The to use for properties of this entity type. /// The same builder instance so that multiple configuration calls can be chained. public new virtual OwnedNavigationBuilder UsePropertyAccessMode( diff --git a/src/EFCore/Metadata/Builders/OwnershipBuilder.cs b/src/EFCore/Metadata/Builders/OwnershipBuilder.cs index 1ed14b9d64a..292c2e2c79d 100644 --- a/src/EFCore/Metadata/Builders/OwnershipBuilder.cs +++ b/src/EFCore/Metadata/Builders/OwnershipBuilder.cs @@ -9,9 +9,7 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring an ownership. - /// + /// Provides a simple API for configuring an ownership. /// /// /// See Modeling entity types and relationships for more information. @@ -67,9 +65,9 @@ public virtual OwnershipBuilder HasAnnotation(string annotation, object? value) } /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// + /// Configures the property(s) to use as the foreign key for this relationship. + /// + /// /// /// If the specified property name(s) do not exist on the entity type then a new shadow state /// property(s) will be added to serve as the foreign key. A shadow state property is one @@ -83,7 +81,7 @@ public virtual OwnershipBuilder HasAnnotation(string annotation, object? value) /// entity type. If they do not match, new shadow state properties that form a unique index will be /// added to the principal entity type to serve as the reference key. /// - /// + /// /// /// The name(s) of the foreign key property(s). /// diff --git a/src/EFCore/Metadata/Builders/OwnershipBuilder`.cs b/src/EFCore/Metadata/Builders/OwnershipBuilder`.cs index 55aa5b7b0ba..2452d563beb 100644 --- a/src/EFCore/Metadata/Builders/OwnershipBuilder`.cs +++ b/src/EFCore/Metadata/Builders/OwnershipBuilder`.cs @@ -11,9 +11,7 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring an ownership. - /// + /// Provides a simple API for configuring an ownership. /// /// /// See Modeling entity types and relationships for more information. @@ -67,9 +65,9 @@ protected OwnershipBuilder( => (OwnershipBuilder)base.HasAnnotation(annotation, value); /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// + /// Configures the property(s) to use as the foreign key for this relationship. + /// + /// /// /// If the specified property name(s) do not exist on the entity type then a new shadow state /// property(s) will be added to serve as the foreign key. A shadow state property is one @@ -83,7 +81,7 @@ protected OwnershipBuilder( /// entity type. If they do not match, new shadow state properties that form a unique index will be /// added to the principal entity type to serve as the reference key. /// - /// + /// /// /// The name(s) of the foreign key property(s). /// @@ -102,9 +100,9 @@ protected OwnershipBuilder( } /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// + /// Configures the property(s) to use as the foreign key for this relationship. + /// + /// /// /// If the specified property name(s) do not exist on the entity type then a new shadow state /// property(s) will be added to serve as the foreign key. A shadow state property is one @@ -118,7 +116,7 @@ protected OwnershipBuilder( /// key of the principal entity type. If they do not match, new shadow state properties that form a /// unique index will be added to the principal entity type to serve as the reference key. /// - /// + /// /// /// /// A lambda expression representing the foreign key property(s) (t => t.Id1). diff --git a/src/EFCore/Metadata/Builders/PropertiesConfigurationBuilder.cs b/src/EFCore/Metadata/Builders/PropertiesConfigurationBuilder.cs index a4f8df7346e..1220d2a8919 100644 --- a/src/EFCore/Metadata/Builders/PropertiesConfigurationBuilder.cs +++ b/src/EFCore/Metadata/Builders/PropertiesConfigurationBuilder.cs @@ -12,15 +12,13 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API surface for setting property defaults before conventions run. - /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Provides a simple API surface for setting property defaults before conventions run. /// /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. + /// + /// /// See Modeling entity types and relationships for more information. /// public class PropertiesConfigurationBuilder @@ -91,9 +89,7 @@ public virtual PropertiesConfigurationBuilder HavePrecision(int precision, int s } /// - /// - /// Configures the precision of the property. - /// + /// Configures the precision of the property. /// /// The precision of the property. /// The same builder instance so that multiple configuration calls can be chained. diff --git a/src/EFCore/Metadata/Builders/PropertiesConfigurationBuilder`.cs b/src/EFCore/Metadata/Builders/PropertiesConfigurationBuilder`.cs index dab99d870d0..2a25800d765 100644 --- a/src/EFCore/Metadata/Builders/PropertiesConfigurationBuilder`.cs +++ b/src/EFCore/Metadata/Builders/PropertiesConfigurationBuilder`.cs @@ -10,15 +10,13 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API surface for setting property defaults before conventions run. - /// - /// - /// Instances of this class are returned from methods when using the API - /// and it is not designed to be directly constructed in your application code. - /// + /// Provides a simple API surface for setting property defaults before conventions run. /// /// + /// Instances of this class are returned from methods when using the API + /// and it is not designed to be directly constructed in your application code. + /// + /// /// See Modeling entity types and relationships for more information. /// public class PropertiesConfigurationBuilder : PropertiesConfigurationBuilder @@ -64,9 +62,7 @@ public PropertiesConfigurationBuilder(PropertyConfiguration property) => (PropertiesConfigurationBuilder)base.HavePrecision(precision, scale); /// - /// - /// Configures the precision of the property. - /// + /// Configures the precision of the property. /// /// The precision of the property. /// The same builder instance so that multiple configuration calls can be chained. diff --git a/src/EFCore/Metadata/Builders/PropertyBuilder.cs b/src/EFCore/Metadata/Builders/PropertyBuilder.cs index 6c47bf43a24..3374516ea7e 100644 --- a/src/EFCore/Metadata/Builders/PropertyBuilder.cs +++ b/src/EFCore/Metadata/Builders/PropertyBuilder.cs @@ -13,16 +13,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a . - /// + /// Provides a simple API for configuring a . + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class PropertyBuilder : IInfrastructure { @@ -112,9 +112,7 @@ public virtual PropertyBuilder HasPrecision(int precision, int scale) } /// - /// - /// Configures the precision of the property. - /// + /// Configures the precision of the property. /// /// The precision of the property. /// The same builder instance so that multiple configuration calls can be chained. @@ -139,15 +137,13 @@ public virtual PropertyBuilder IsUnicode(bool unicode = true) } /// - /// - /// Configures the property as and - /// . - /// - /// - /// Database providers can choose to interpret this in different way, but it is commonly used - /// to indicate some form of automatic row-versioning as used for optimistic concurrency detection. - /// + /// Configures the property as and + /// . /// + /// + /// Database providers can choose to interpret this in different way, but it is commonly used + /// to indicate some form of automatic row-versioning as used for optimistic concurrency detection. + /// /// The same builder instance so that multiple configuration calls can be chained. public virtual PropertyBuilder IsRowVersion() { @@ -158,9 +154,9 @@ public virtual PropertyBuilder IsRowVersion() } /// - /// - /// Configures the that will generate values for this property. - /// + /// Configures the that will generate values for this property. + /// + /// /// /// Values are generated when the entity is added to the context using, for example, /// . Values are generated only when the property is assigned @@ -175,7 +171,7 @@ public virtual PropertyBuilder IsRowVersion() /// This method is intended for use with custom value generation. Value generation for common cases is /// usually handled automatically by the database provider. /// - /// + /// /// A type that inherits from . /// The same builder instance so that multiple configuration calls can be chained. public virtual PropertyBuilder HasValueGenerator() @@ -187,9 +183,9 @@ public virtual PropertyBuilder HasValueGenerator() } /// - /// - /// Configures the that will generate values for this property. - /// + /// Configures the that will generate values for this property. + /// + /// /// /// Values are generated when the entity is added to the context using, for example, /// . Values are generated only when the property is assigned @@ -208,7 +204,7 @@ public virtual PropertyBuilder HasValueGenerator() /// Setting does not disable value generation for this property, it just clears any generator explicitly /// configured for this property. The database provider may still have a value generator for the property type. /// - /// + /// /// A type that inherits from . /// The same builder instance so that multiple configuration calls can be chained. public virtual PropertyBuilder HasValueGenerator(Type? valueGeneratorType) @@ -219,10 +215,10 @@ public virtual PropertyBuilder HasValueGenerator(Type? valueGeneratorType) } /// - /// - /// Configures a factory for creating a to use to generate values - /// for this property. - /// + /// Configures a factory for creating a to use to generate values + /// for this property. + /// + /// /// /// Values are generated when the entity is added to the context using, for example, /// . Values are generated only when the property is assigned @@ -237,7 +233,7 @@ public virtual PropertyBuilder HasValueGenerator(Type? valueGeneratorType) /// This method is intended for use with custom value generation. Value generation for common cases is /// usually handled automatically by the database provider. /// - /// + /// /// A delegate that will be used to create value generator instances. /// The same builder instance so that multiple configuration calls can be chained. public virtual PropertyBuilder HasValueGenerator(Func factory) @@ -250,10 +246,10 @@ public virtual PropertyBuilder HasValueGenerator(Func - /// - /// Configures the for creating a - /// to use to generate values for this property. - /// + /// Configures the for creating a + /// to use to generate values for this property. + /// + /// /// /// Values are generated when the entity is added to the context using, for example, /// . Values are generated only when the property is assigned @@ -272,7 +268,7 @@ public virtual PropertyBuilder HasValueGenerator(Func does not disable value generation for this property, it just clears any generator explicitly /// configured for this property. The database provider may still have a value generator for the property type. /// - /// + /// /// A type that inherits from . /// The same builder instance so that multiple configuration calls can be chained. public virtual PropertyBuilder HasValueGeneratorFactory() @@ -280,10 +276,10 @@ public virtual PropertyBuilder HasValueGeneratorFactory() => HasValueGeneratorFactory(typeof(TFactory)); /// - /// - /// Configures the for creating a - /// to use to generate values for this property. - /// + /// Configures the for creating a + /// to use to generate values for this property. + /// + /// /// /// Values are generated when the entity is added to the context using, for example, /// . Values are generated only when the property is assigned @@ -302,7 +298,7 @@ public virtual PropertyBuilder HasValueGeneratorFactory() /// Setting does not disable value generation for this property, it just clears any generator explicitly /// configured for this property. The database provider may still have a value generator for the property type. /// - /// + /// /// A type that inherits from . /// The same builder instance so that multiple configuration calls can be chained. public virtual PropertyBuilder HasValueGeneratorFactory(Type? valueGeneratorFactoryType) @@ -391,9 +387,9 @@ public virtual PropertyBuilder ValueGeneratedOnUpdateSometimes() } /// - /// - /// Sets the backing field to use for this property. - /// + /// Sets the backing field to use for this property. + /// + /// /// /// Backing fields are normally found by convention as described /// here: http://go.microsoft.com/fwlink/?LinkId=723277. @@ -406,7 +402,7 @@ public virtual PropertyBuilder ValueGeneratedOnUpdateSometimes() /// Properties are used for all other accesses. This can be changed by calling /// . /// - /// + /// /// The field name. /// The same builder instance so that multiple configuration calls can be chained. public virtual PropertyBuilder HasField(string fieldName) @@ -419,9 +415,9 @@ public virtual PropertyBuilder HasField(string fieldName) } /// - /// - /// Sets the to use for this property. - /// + /// Sets the to use for this property. + /// + /// /// /// By default, the backing field, if one is found by convention or has been specified, is used when /// new objects are constructed, typically when entities are queried from the database. @@ -432,7 +428,7 @@ public virtual PropertyBuilder HasField(string fieldName) /// Calling this method overrides for this property any access mode that was set on the /// entity type or model. /// - /// + /// /// The to use for this property. /// The same builder instance so that multiple configuration calls can be chained. public virtual PropertyBuilder UsePropertyAccessMode(PropertyAccessMode propertyAccessMode) diff --git a/src/EFCore/Metadata/Builders/PropertyBuilder`.cs b/src/EFCore/Metadata/Builders/PropertyBuilder`.cs index 2212fb178d4..6da55293444 100644 --- a/src/EFCore/Metadata/Builders/PropertyBuilder`.cs +++ b/src/EFCore/Metadata/Builders/PropertyBuilder`.cs @@ -12,16 +12,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a . - /// + /// Provides a simple API for configuring a . + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class PropertyBuilder : PropertyBuilder { @@ -76,9 +76,7 @@ public PropertyBuilder(IMutableProperty property) => (PropertyBuilder)base.HasPrecision(precision, scale); /// - /// - /// Configures the precision of the property. - /// + /// Configures the precision of the property. /// /// The precision of the property. /// The same builder instance so that multiple configuration calls can be chained. @@ -95,23 +93,21 @@ public PropertyBuilder(IMutableProperty property) => (PropertyBuilder)base.IsUnicode(unicode); /// - /// - /// Configures the property as and - /// . - /// - /// - /// Database providers can choose to interpret this in different way, but it is commonly used - /// to indicate some form of automatic row-versioning as used for optimistic concurrency detection. - /// + /// Configures the property as and + /// . /// + /// + /// Database providers can choose to interpret this in different way, but it is commonly used + /// to indicate some form of automatic row-versioning as used for optimistic concurrency detection. + /// /// The same builder instance so that multiple configuration calls can be chained. public new virtual PropertyBuilder IsRowVersion() => (PropertyBuilder)base.IsRowVersion(); /// - /// - /// Configures the that will generate values for this property. - /// + /// Configures the that will generate values for this property. + /// + /// /// /// Values are generated when the entity is added to the context using, for example, /// . Values are generated only when the property is assigned @@ -126,7 +122,7 @@ public PropertyBuilder(IMutableProperty property) /// This method is intended for use with custom value generation. Value generation for common cases is /// usually handled automatically by the database provider. /// - /// + /// /// A type that inherits from . /// The same builder instance so that multiple configuration calls can be chained. public new virtual PropertyBuilder HasValueGenerator() @@ -134,9 +130,9 @@ public PropertyBuilder(IMutableProperty property) => (PropertyBuilder)base.HasValueGenerator(); /// - /// - /// Configures the that will generate values for this property. - /// + /// Configures the that will generate values for this property. + /// + /// /// /// Values are generated when the entity is added to the context using, for example, /// . Values are generated only when the property is assigned @@ -155,17 +151,17 @@ public PropertyBuilder(IMutableProperty property) /// Setting null does not disable value generation for this property, it just clears any generator explicitly /// configured for this property. The database provider may still have a value generator for the property type. /// - /// + /// /// A type that inherits from . /// The same builder instance so that multiple configuration calls can be chained. public new virtual PropertyBuilder HasValueGenerator(Type? valueGeneratorType) => (PropertyBuilder)base.HasValueGenerator(valueGeneratorType); /// - /// - /// Configures a factory for creating a to use to generate values - /// for this property. - /// + /// Configures a factory for creating a to use to generate values + /// for this property. + /// + /// /// /// Values are generated when the entity is added to the context using, for example, /// . Values are generated only when the property is assigned @@ -180,17 +176,17 @@ public PropertyBuilder(IMutableProperty property) /// This method is intended for use with custom value generation. Value generation for common cases is /// usually handled automatically by the database provider. /// - /// + /// /// A delegate that will be used to create value generator instances. /// The same builder instance so that multiple configuration calls can be chained. public new virtual PropertyBuilder HasValueGenerator(Func factory) => (PropertyBuilder)base.HasValueGenerator(factory); /// - /// - /// Configures the for creating a - /// to use to generate values for this property. - /// + /// Configures the for creating a + /// to use to generate values for this property. + /// + /// /// /// Values are generated when the entity is added to the context using, for example, /// . Values are generated only when the property is assigned @@ -209,7 +205,7 @@ public PropertyBuilder(IMutableProperty property) /// Setting does not disable value generation for this property, it just clears any generator explicitly /// configured for this property. The database provider may still have a value generator for the property type. /// - /// + /// /// A type that inherits from . /// The same builder instance so that multiple configuration calls can be chained. public new virtual PropertyBuilder HasValueGeneratorFactory() @@ -217,10 +213,10 @@ public PropertyBuilder(IMutableProperty property) => (PropertyBuilder)base.HasValueGeneratorFactory(); /// - /// - /// Configures the for creating a - /// to use to generate values for this property. - /// + /// Configures the for creating a + /// to use to generate values for this property. + /// + /// /// /// Values are generated when the entity is added to the context using, for example, /// . Values are generated only when the property is assigned @@ -239,7 +235,7 @@ public PropertyBuilder(IMutableProperty property) /// Setting does not disable value generation for this property, it just clears any generator explicitly /// configured for this property. The database provider may still have a value generator for the property type. /// - /// + /// /// A type that inherits from . /// The same builder instance so that multiple configuration calls can be chained. public new virtual PropertyBuilder HasValueGeneratorFactory(Type? valueGeneratorFactoryType) @@ -301,9 +297,9 @@ public PropertyBuilder(IMutableProperty property) => (PropertyBuilder)base.ValueGeneratedOnUpdateSometimes(); /// - /// - /// Sets the backing field to use for this property. - /// + /// Sets the backing field to use for this property. + /// + /// /// /// Backing fields are normally found by convention as described /// here: http://go.microsoft.com/fwlink/?LinkId=723277. @@ -316,16 +312,16 @@ public PropertyBuilder(IMutableProperty property) /// Properties are used for all other accesses. This can be changed by calling /// . /// - /// + /// /// The field name. /// The same builder instance so that multiple configuration calls can be chained. public new virtual PropertyBuilder HasField(string fieldName) => (PropertyBuilder)base.HasField(fieldName); /// - /// - /// Sets the to use for this property. - /// + /// Sets the to use for this property. + /// + /// /// /// By default, the backing field, if one is found by convention or has been specified, is used when /// new objects are constructed, typically when entities are queried from the database. @@ -336,7 +332,7 @@ public PropertyBuilder(IMutableProperty property) /// Calling this method overrides for this property any access mode that was set on the /// entity type or model. /// - /// + /// /// The to use for this property. /// The same builder instance so that multiple configuration calls can be chained. public new virtual PropertyBuilder UsePropertyAccessMode(PropertyAccessMode propertyAccessMode) diff --git a/src/EFCore/Metadata/Builders/ReferenceCollectionBuilder.cs b/src/EFCore/Metadata/Builders/ReferenceCollectionBuilder.cs index 2e3685681e8..d9d2844e985 100644 --- a/src/EFCore/Metadata/Builders/ReferenceCollectionBuilder.cs +++ b/src/EFCore/Metadata/Builders/ReferenceCollectionBuilder.cs @@ -11,16 +11,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a one-to-many relationship. - /// + /// Provides a simple API for configuring a one-to-many relationship. + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class ReferenceCollectionBuilder : RelationshipBuilderBase { @@ -74,9 +74,9 @@ public virtual ReferenceCollectionBuilder HasAnnotation(string annotation, objec } /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// + /// Configures the property(s) to use as the foreign key for this relationship. + /// + /// /// /// If the specified property name(s) do not exist on the entity type then a new shadow state /// property(s) will be added to serve as the foreign key. A shadow state property is one @@ -90,7 +90,7 @@ public virtual ReferenceCollectionBuilder HasAnnotation(string annotation, objec /// entity type. If they do not match, new shadow state properties that form a unique index will be /// added to the principal entity type to serve as the reference key. /// - /// + /// /// /// The name(s) of the foreign key property(s). /// diff --git a/src/EFCore/Metadata/Builders/ReferenceCollectionBuilder`.cs b/src/EFCore/Metadata/Builders/ReferenceCollectionBuilder`.cs index 17fd8490070..f0f0a9a3018 100644 --- a/src/EFCore/Metadata/Builders/ReferenceCollectionBuilder`.cs +++ b/src/EFCore/Metadata/Builders/ReferenceCollectionBuilder`.cs @@ -11,16 +11,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a one-to-many relationship. - /// + /// Provides a simple API for configuring a one-to-many relationship. + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// /// The principal entity type in this relationship. /// The dependent entity type in this relationship. @@ -75,9 +75,9 @@ protected ReferenceCollectionBuilder( Check.NotNull(value, nameof(value))); /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// + /// Configures the property(s) to use as the foreign key for this relationship. + /// + /// /// /// If the specified property name(s) do not exist on the entity type then a new shadow state /// property(s) will be added to serve as the foreign key. A shadow state property is one @@ -91,7 +91,7 @@ protected ReferenceCollectionBuilder( /// the primary key of the principal entity type. If they do not match, new shadow state properties /// that form a unique index will be added to the principal entity type to serve as the reference key. /// - /// + /// /// /// The name(s) of the foreign key property(s). /// @@ -104,19 +104,17 @@ protected ReferenceCollectionBuilder( foreignKeySet: true); /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// - /// - /// If is not specified, then - /// an attempt will be made to match the data type and order of foreign key properties against the - /// primary key of the principal entity type. If they do not match, new shadow state properties that - /// form a unique index will be added to the principal entity type to serve as the reference key. - /// A shadow state property is one that does not have a corresponding property in the entity class. The - /// current value for the property is stored in the rather than being - /// stored in instances of the entity class. - /// + /// Configures the property(s) to use as the foreign key for this relationship. /// + /// + /// If is not specified, then + /// an attempt will be made to match the data type and order of foreign key properties against the + /// primary key of the principal entity type. If they do not match, new shadow state properties that + /// form a unique index will be added to the principal entity type to serve as the reference key. + /// A shadow state property is one that does not have a corresponding property in the entity class. The + /// current value for the property is stored in the rather than being + /// stored in instances of the entity class. + /// /// /// /// A lambda expression representing the foreign key property(s) (post => post.BlogId). diff --git a/src/EFCore/Metadata/Builders/ReferenceNavigationBuilder.cs b/src/EFCore/Metadata/Builders/ReferenceNavigationBuilder.cs index 157a2fb7b2c..3a5adfdced9 100644 --- a/src/EFCore/Metadata/Builders/ReferenceNavigationBuilder.cs +++ b/src/EFCore/Metadata/Builders/ReferenceNavigationBuilder.cs @@ -14,17 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a relationship where configuration began on - /// an end of the relationship with a reference that points to an instance of another entity type. - /// + /// Provides a simple API for configuring a relationship where configuration began on + /// an end of the relationship with a reference that points to an instance of another entity type. + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class ReferenceNavigationBuilder : IInfrastructure { @@ -119,15 +119,13 @@ IConventionForeignKeyBuilder IInfrastructure.Insta => Builder; /// - /// - /// Configures this as a one-to-many relationship. - /// - /// - /// Note that calling this method with no parameters will explicitly configure this side - /// of the relationship to use no navigation property, even if such a property exists on the - /// entity type. If the navigation property is to be used, then it must be specified. - /// + /// Configures this as a one-to-many relationship. /// + /// + /// Note that calling this method with no parameters will explicitly configure this side + /// of the relationship to use no navigation property, even if such a property exists on the + /// entity type. If the navigation property is to be used, then it must be specified. + /// /// /// The name of the collection navigation property on the other end of this relationship. /// If null or not specified, there is no navigation property on the other end of the relationship. @@ -194,15 +192,13 @@ private InternalForeignKeyBuilder WithManyBuilder(MemberIdentity collection) } /// - /// - /// Configures this as a one-to-one relationship. - /// - /// - /// Note that calling this method with no parameters will explicitly configure this side - /// of the relationship to use no navigation property, even if such a property exists on the - /// entity type. If the navigation property is to be used, then it must be specified. - /// + /// Configures this as a one-to-one relationship. /// + /// + /// Note that calling this method with no parameters will explicitly configure this side + /// of the relationship to use no navigation property, even if such a property exists on the + /// entity type. If the navigation property is to be used, then it must be specified. + /// /// /// The name of the reference navigation property on the other end of this relationship. /// If null or not specified, there is no navigation property on the other end of the relationship. diff --git a/src/EFCore/Metadata/Builders/ReferenceNavigationBuilder`.cs b/src/EFCore/Metadata/Builders/ReferenceNavigationBuilder`.cs index f3ee94498aa..1791f154811 100644 --- a/src/EFCore/Metadata/Builders/ReferenceNavigationBuilder`.cs +++ b/src/EFCore/Metadata/Builders/ReferenceNavigationBuilder`.cs @@ -11,17 +11,17 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a relationship where configuration began on an end of the - /// relationship with a reference that points to an instance of another entity type. - /// + /// Provides a simple API for configuring a relationship where configuration began on an end of the + /// relationship with a reference that points to an instance of another entity type. + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// /// The entity type to be configured. /// The entity type that this relationship targets. @@ -62,15 +62,13 @@ public ReferenceNavigationBuilder( } /// - /// - /// Configures this as a one-to-many relationship. - /// - /// - /// Note that calling this method with no parameters will explicitly configure this side - /// of the relationship to use no navigation property, even if such a property exists on the - /// entity type. If the navigation property is to be used, then it must be specified. - /// + /// Configures this as a one-to-many relationship. /// + /// + /// Note that calling this method with no parameters will explicitly configure this side + /// of the relationship to use no navigation property, even if such a property exists on the + /// entity type. If the navigation property is to be used, then it must be specified. + /// /// /// The name of the collection navigation property on the other end of this relationship. /// If null or not specified, there is no navigation property on the other end of the relationship. @@ -87,15 +85,13 @@ public ReferenceNavigationBuilder( } /// - /// - /// Configures this as a one-to-many relationship. - /// - /// - /// Note that calling this method with no parameters will explicitly configure this side - /// of the relationship to use no navigation property, even if such a property exists on the - /// entity type. If the navigation property is to be used, then it must be specified. - /// + /// Configures this as a one-to-many relationship. /// + /// + /// Note that calling this method with no parameters will explicitly configure this side + /// of the relationship to use no navigation property, even if such a property exists on the + /// entity type. If the navigation property is to be used, then it must be specified. + /// /// /// A lambda expression representing the collection navigation property on the other end of this /// relationship (blog => blog.Posts). If no property is specified, the relationship will be @@ -112,15 +108,13 @@ public virtual ReferenceCollectionBuilder WithMany( } /// - /// - /// Configures this as a one-to-one relationship. - /// - /// - /// Note that calling this method with no parameters will explicitly configure this side - /// of the relationship to use no navigation property, even if such a property exists on the - /// entity type. If the navigation property is to be used, then it must be specified. - /// + /// Configures this as a one-to-one relationship. /// + /// + /// Note that calling this method with no parameters will explicitly configure this side + /// of the relationship to use no navigation property, even if such a property exists on the + /// entity type. If the navigation property is to be used, then it must be specified. + /// /// /// The name of the reference navigation property on the other end of this relationship. /// If null or not specified, there is no navigation property on the other end of the relationship. @@ -135,15 +129,13 @@ public virtual ReferenceCollectionBuilder WithMany( Check.NullButNotEmpty(navigationName, nameof(navigationName))).Metadata); /// - /// - /// Configures this as a one-to-one relationship. - /// - /// - /// Note that calling this method with no parameters will explicitly configure this side - /// of the relationship to use no navigation property, even if such a property exists on the - /// entity type. If the navigation property is to be used, then it must be specified. - /// + /// Configures this as a one-to-one relationship. /// + /// + /// Note that calling this method with no parameters will explicitly configure this side + /// of the relationship to use no navigation property, even if such a property exists on the + /// entity type. If the navigation property is to be used, then it must be specified. + /// /// /// A lambda expression representing the reference navigation property on the other end of this /// relationship (blog => blog.BlogInfo). If no property is specified, the relationship will be diff --git a/src/EFCore/Metadata/Builders/ReferenceReferenceBuilder.cs b/src/EFCore/Metadata/Builders/ReferenceReferenceBuilder.cs index 26debf88786..815fe93cd24 100644 --- a/src/EFCore/Metadata/Builders/ReferenceReferenceBuilder.cs +++ b/src/EFCore/Metadata/Builders/ReferenceReferenceBuilder.cs @@ -14,9 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a one-to-one relationship. - /// + /// Provides a simple API for configuring a one-to-one relationship. /// /// /// See Modeling entity types and relationships for more information. @@ -73,9 +71,9 @@ public virtual ReferenceReferenceBuilder HasAnnotation(string annotation, object } /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// + /// Configures the property(s) to use as the foreign key for this relationship. + /// + /// /// /// If the specified property name(s) do not exist on the entity type then a new shadow state /// property(s) will be added to serve as the foreign key. A shadow state property is one @@ -89,7 +87,7 @@ public virtual ReferenceReferenceBuilder HasAnnotation(string annotation, object /// entity type. If they do not match, new shadow state properties that form a unique index will be /// added to the principal entity type to serve as the reference key. /// - /// + /// /// /// The name of the entity type that is the dependent in this relationship (the type that has the foreign /// key properties). @@ -111,9 +109,9 @@ public virtual ReferenceReferenceBuilder HasForeignKey( foreignKeySet: foreignKeyPropertyNames.Length > 0); /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// + /// Configures the property(s) to use as the foreign key for this relationship. + /// + /// /// /// If the specified property name(s) do not exist on the entity type then a new shadow state /// property(s) will be added to serve as the foreign key. A shadow state property is one @@ -127,7 +125,7 @@ public virtual ReferenceReferenceBuilder HasForeignKey( /// entity type. If they do not match, new shadow state properties that form a unique index will be /// added to the principal entity type to serve as the reference key. /// - /// + /// /// /// The entity type that is the dependent in this relationship (the type that has the foreign key /// properties). diff --git a/src/EFCore/Metadata/Builders/ReferenceReferenceBuilder`.cs b/src/EFCore/Metadata/Builders/ReferenceReferenceBuilder`.cs index 0af5e737643..69c67c6fa10 100644 --- a/src/EFCore/Metadata/Builders/ReferenceReferenceBuilder`.cs +++ b/src/EFCore/Metadata/Builders/ReferenceReferenceBuilder`.cs @@ -11,9 +11,7 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API for configuring a one-to-one relationship. - /// + /// Provides a simple API for configuring a one-to-one relationship. /// /// /// See Modeling entity types and relationships for more information. @@ -68,9 +66,9 @@ protected ReferenceReferenceBuilder( => (ReferenceReferenceBuilder)base.HasAnnotation(annotation, value); /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// + /// Configures the property(s) to use as the foreign key for this relationship. + /// + /// /// /// If the specified property name(s) do not exist on the entity type then a new shadow state /// property(s) will be added to serve as the foreign key. A shadow state property is one @@ -84,7 +82,7 @@ protected ReferenceReferenceBuilder( /// entity type. If they do not match, new shadow state properties that form a unique index will be /// added to the principal entity type to serve as the reference key. /// - /// + /// /// /// The name of entity type that is the dependent in this relationship (the type that has the foreign key /// properties). @@ -106,9 +104,9 @@ protected ReferenceReferenceBuilder( foreignKeySet: foreignKeyPropertyNames.Length > 0); /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// + /// Configures the property(s) to use as the foreign key for this relationship. + /// + /// /// /// If the specified property name(s) do not exist on the entity type then a new shadow state /// property(s) will be added to serve as the foreign key. A shadow state property is one @@ -122,7 +120,7 @@ protected ReferenceReferenceBuilder( /// entity type. If they do not match, new shadow state properties that form a unique index will be /// added to the principal entity type to serve as the reference key. /// - /// + /// /// /// The entity type that is the dependent in this relationship (the type that has the foreign key /// properties). @@ -144,9 +142,9 @@ protected ReferenceReferenceBuilder( foreignKeySet: foreignKeyPropertyNames.Length > 0); /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// + /// Configures the property(s) to use as the foreign key for this relationship. + /// + /// /// /// If the specified property name(s) do not exist on the entity type then a new shadow state /// property(s) will be added to serve as the foreign key. A shadow state property is one @@ -160,7 +158,7 @@ protected ReferenceReferenceBuilder( /// entity type. If they do not match, new shadow state properties that form a unique index will be /// added to the principal entity type to serve as the referenced key. /// - /// + /// /// /// The entity type that is the dependent in this relationship (the type that has the foreign key /// properties). @@ -175,9 +173,9 @@ public virtual ReferenceReferenceBuilder HasForeignKey< => HasForeignKey(typeof(TDependentEntity), foreignKeyPropertyNames); /// - /// - /// Configures the property(s) to use as the foreign key for this relationship. - /// + /// Configures the property(s) to use as the foreign key for this relationship. + /// + /// /// /// If the specified property name(s) do not exist on the entity type then a new shadow state /// property(s) will be added to serve as the foreign key. A shadow state property is one @@ -191,7 +189,7 @@ public virtual ReferenceReferenceBuilder HasForeignKey< /// the principal entity type. If they do not match, new shadow state properties that form a unique /// index will be added to the principal entity type to serve as the reference key. /// - /// + /// /// /// The entity type that is the dependent in this relationship. That is, the type /// that has the foreign key properties. diff --git a/src/EFCore/Metadata/Builders/TypeMappingConfigurationBuilder.cs b/src/EFCore/Metadata/Builders/TypeMappingConfigurationBuilder.cs index 68763236231..b0b34495c17 100644 --- a/src/EFCore/Metadata/Builders/TypeMappingConfigurationBuilder.cs +++ b/src/EFCore/Metadata/Builders/TypeMappingConfigurationBuilder.cs @@ -11,16 +11,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API surface for setting property defaults before conventions run. - /// + /// Provides a simple API surface for setting property defaults before conventions run. + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class TypeMappingConfigurationBuilder { @@ -90,9 +90,7 @@ public virtual TypeMappingConfigurationBuilder HasPrecision(int precision, int s } /// - /// - /// Configures the precision of the property. - /// + /// Configures the precision of the property. /// /// The precision of the property. /// The same builder instance so that multiple configuration calls can be chained. diff --git a/src/EFCore/Metadata/Builders/TypeMappingConfigurationBuilder`.cs b/src/EFCore/Metadata/Builders/TypeMappingConfigurationBuilder`.cs index d2f48452014..2a67c9b8eb7 100644 --- a/src/EFCore/Metadata/Builders/TypeMappingConfigurationBuilder`.cs +++ b/src/EFCore/Metadata/Builders/TypeMappingConfigurationBuilder`.cs @@ -9,16 +9,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Builders { /// - /// - /// Provides a simple API surface for setting property defaults before conventions run. - /// + /// Provides a simple API surface for setting property defaults before conventions run. + /// + /// /// /// Instances of this class are returned from methods when using the API /// and it is not designed to be directly constructed in your application code. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public class TypeMappingConfigurationBuilder : TypeMappingConfigurationBuilder { @@ -63,9 +63,7 @@ public TypeMappingConfigurationBuilder(PropertyConfiguration scalar) => (TypeMappingConfigurationBuilder)base.HasPrecision(precision, scale); /// - /// - /// Configures the precision of the property. - /// + /// Configures the precision of the property. /// /// The precision of the property. /// The same builder instance so that multiple configuration calls can be chained. diff --git a/src/EFCore/Metadata/Conventions/BackingFieldConvention.cs b/src/EFCore/Metadata/Conventions/BackingFieldConvention.cs index 38534c84d12..b1e2cad7143 100644 --- a/src/EFCore/Metadata/Conventions/BackingFieldConvention.cs +++ b/src/EFCore/Metadata/Conventions/BackingFieldConvention.cs @@ -14,22 +14,22 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions { /// - /// - /// A convention that finds backing fields for properties based on their names: - /// * <[property name]>k__BackingField - /// * _[camel-cased property name] - /// * _[property name] - /// * m_[camel-cased property name] - /// * m_[property name] - /// * [property name]_ - /// + /// A convention that finds backing fields for properties based on their names: + /// * <[property name]>k__BackingField + /// * _[camel-cased property name] + /// * _[property name] + /// * m_[camel-cased property name] + /// * m_[property name] + /// * [property name]_ + /// + /// /// /// The field type must be of a type that's assignable to or from the property type. /// If more than one matching field is found an exception is thrown. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public class BackingFieldConvention : IPropertyAddedConvention, diff --git a/src/EFCore/Metadata/Conventions/ConventionSet.cs b/src/EFCore/Metadata/Conventions/ConventionSet.cs index c6c32f82e1b..32e6becda64 100644 --- a/src/EFCore/Metadata/Conventions/ConventionSet.cs +++ b/src/EFCore/Metadata/Conventions/ConventionSet.cs @@ -363,8 +363,7 @@ public static bool Remove( /// the outside of . /// /// - /// Note that it is unusual to use this method. - /// Consider using in the normal way instead. + /// Note that it is unusual to use this method. Consider using in the normal way instead. /// /// /// The convention set. diff --git a/src/EFCore/Metadata/Conventions/ForeignKeyAttributeConvention.cs b/src/EFCore/Metadata/Conventions/ForeignKeyAttributeConvention.cs index 6694cc571e6..c599f104ffa 100644 --- a/src/EFCore/Metadata/Conventions/ForeignKeyAttributeConvention.cs +++ b/src/EFCore/Metadata/Conventions/ForeignKeyAttributeConvention.cs @@ -16,16 +16,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions { /// + /// A convention that configures the foreign key properties associated with a navigation property + /// based on the specified on the properties or the navigation properties. + /// + /// /// - /// A convention that configures the foreign key properties associated with a navigation property - /// based on the specified on the properties or the navigation properties. + /// For one-to-one relationships the attribute has to be specified on the navigation property pointing to the principal. /// /// - /// For one-to-one relationships the attribute has to be specified on the navigation property pointing to the principal. + /// See Model building conventions for more information. /// - /// - /// - /// See Model building conventions for more information. /// public class ForeignKeyAttributeConvention : IEntityTypeAddedConvention, diff --git a/src/EFCore/Metadata/Conventions/ForeignKeyPropertyDiscoveryConvention.cs b/src/EFCore/Metadata/Conventions/ForeignKeyPropertyDiscoveryConvention.cs index 6903f178af2..da13455f94e 100644 --- a/src/EFCore/Metadata/Conventions/ForeignKeyPropertyDiscoveryConvention.cs +++ b/src/EFCore/Metadata/Conventions/ForeignKeyPropertyDiscoveryConvention.cs @@ -13,13 +13,13 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions { /// - /// - /// A convention that finds foreign key properties for relationships based on their names, ignoring case: - /// * [navigation property name][principal key property name] - /// * [navigation property name]Id - /// * [principal entity name][principal key property name] - /// * [principal entity name]Id - /// + /// A convention that finds foreign key properties for relationships based on their names, ignoring case: + /// * [navigation property name][principal key property name] + /// * [navigation property name]Id + /// * [principal entity name][principal key property name] + /// * [principal entity name]Id + /// + /// /// /// If no matching properties were found, the relationship doesn't represent an ownership, /// the dependent side is not ambiguous and not derived then if the relationship is one-to-one, @@ -35,9 +35,9 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions /// If the relationship uses shadow properties created by convention they are recreated to remove suffixes /// used to make the names unique. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public class ForeignKeyPropertyDiscoveryConvention : IEntityTypeMemberIgnoredConvention, diff --git a/src/EFCore/Metadata/Conventions/IConventionContext.cs b/src/EFCore/Metadata/Conventions/IConventionContext.cs index c5a91498788..7825680d157 100644 --- a/src/EFCore/Metadata/Conventions/IConventionContext.cs +++ b/src/EFCore/Metadata/Conventions/IConventionContext.cs @@ -12,24 +12,20 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions public interface IConventionContext { /// - /// - /// Calling this will prevent further processing of the associated event by other conventions. - /// - /// - /// The common use case is when the metadata object was removed by the convention. - /// + /// Calling this will prevent further processing of the associated event by other conventions. /// + /// + /// The common use case is when the metadata object was removed by the convention. + /// void StopProcessing(); /// - /// - /// Prevents conventions from being executed immediately when a metadata aspect is modified. All the delayed conventions - /// will be executed after the returned object is disposed. - /// - /// - /// This is useful when performing multiple operations that depend on each other. - /// + /// Prevents conventions from being executed immediately when a metadata aspect is modified. All the delayed conventions + /// will be executed after the returned object is disposed. /// + /// + /// This is useful when performing multiple operations that depend on each other. + /// /// An object that should be disposed to execute the delayed conventions. IConventionBatch DelayConventions(); } diff --git a/src/EFCore/Metadata/Conventions/IConventionContext`.cs b/src/EFCore/Metadata/Conventions/IConventionContext`.cs index 296fc8a7267..5f80f236f62 100644 --- a/src/EFCore/Metadata/Conventions/IConventionContext`.cs +++ b/src/EFCore/Metadata/Conventions/IConventionContext`.cs @@ -13,25 +13,21 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions public interface IConventionContext : IConventionContext { /// - /// - /// Calling this will prevent further processing of the associated event by other conventions. - /// - /// - /// The common use case is when the metadata object was replaced by the convention. - /// + /// Calling this will prevent further processing of the associated event by other conventions. /// + /// + /// The common use case is when the metadata object was replaced by the convention. + /// /// The new metadata object or . void StopProcessing(TMetadata? result); /// - /// - /// Calling this will prevent further processing of the associated event by other conventions - /// if the given objects are different. - /// - /// - /// The common use case is when the metadata object was replaced by the convention. - /// + /// Calling this will prevent further processing of the associated event by other conventions + /// if the given objects are different. /// + /// + /// The common use case is when the metadata object was replaced by the convention. + /// /// The new metadata object or . void StopProcessingIfChanged(TMetadata? result); } diff --git a/src/EFCore/Metadata/Conventions/IModelFinalizedConvention.cs b/src/EFCore/Metadata/Conventions/IModelFinalizedConvention.cs index b7efae57cef..cd8fe99f417 100644 --- a/src/EFCore/Metadata/Conventions/IModelFinalizedConvention.cs +++ b/src/EFCore/Metadata/Conventions/IModelFinalizedConvention.cs @@ -12,9 +12,11 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions public interface IModelFinalizedConvention : IConvention { /// - /// Called after a model is finalized and can no longer be mutated. - /// The implementation must be thread-safe. + /// Called after a model is finalized and can no longer be mutated. /// + /// + /// The implementation must be thread-safe. + /// /// The model. IModel ProcessModelFinalized(IModel model); } diff --git a/src/EFCore/Metadata/Conventions/Infrastructure/IConventionSetBuilder.cs b/src/EFCore/Metadata/Conventions/Infrastructure/IConventionSetBuilder.cs index 40590fa9c70..e20d1975822 100644 --- a/src/EFCore/Metadata/Conventions/Infrastructure/IConventionSetBuilder.cs +++ b/src/EFCore/Metadata/Conventions/Infrastructure/IConventionSetBuilder.cs @@ -14,15 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionSetBuilder { diff --git a/src/EFCore/Metadata/Conventions/Infrastructure/IConventionSetPlugin.cs b/src/EFCore/Metadata/Conventions/Infrastructure/IConventionSetPlugin.cs index 939a17fbae6..e1164bacb85 100644 --- a/src/EFCore/Metadata/Conventions/Infrastructure/IConventionSetPlugin.cs +++ b/src/EFCore/Metadata/Conventions/Infrastructure/IConventionSetPlugin.cs @@ -11,11 +11,13 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure /// the being used. /// /// - /// Database providers should implement . This service - /// is intended only for non-provider extensions that need to customize conventions. + /// This type is typically used by extensions. It is generally not used in application code. /// + /// + /// /// - /// This type is typically used by extensions. It is generally not used in application code. + /// Database providers should implement . This service + /// is intended only for non-provider extensions that need to customize conventions. /// /// /// The service lifetime is and multiple registrations @@ -24,9 +26,9 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure /// The implementations may depend on other services registered with any lifetime. /// The implementations do not need to be thread-safe. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionSetPlugin { diff --git a/src/EFCore/Metadata/Conventions/Infrastructure/IProviderConventionSetBuilder.cs b/src/EFCore/Metadata/Conventions/Infrastructure/IProviderConventionSetBuilder.cs index 80c580474b3..559cc6c34ef 100644 --- a/src/EFCore/Metadata/Conventions/Infrastructure/IProviderConventionSetBuilder.cs +++ b/src/EFCore/Metadata/Conventions/Infrastructure/IProviderConventionSetBuilder.cs @@ -13,23 +13,25 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure /// service. /// /// + /// This type is typically used by database providers (and other extensions). It is generally + /// not used in application code. + /// + /// + /// + /// /// Database providers should implement this service by inheriting from either /// (for non-relational providers) or /// `RelationalConventionSetBuilder` (for relational providers). /// /// - /// This type is typically used by database providers (and other extensions). It is generally - /// not used in application code. - /// - /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IProviderConventionSetBuilder { diff --git a/src/EFCore/Metadata/Conventions/Infrastructure/ProviderConventionSetBuilder.cs b/src/EFCore/Metadata/Conventions/Infrastructure/ProviderConventionSetBuilder.cs index c8b9509981a..83ed2c935f8 100644 --- a/src/EFCore/Metadata/Conventions/Infrastructure/ProviderConventionSetBuilder.cs +++ b/src/EFCore/Metadata/Conventions/Infrastructure/ProviderConventionSetBuilder.cs @@ -15,22 +15,24 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure /// service. /// /// - /// Database providers should implement this service by inheriting from either - /// this class (for non-relational providers) or `RelationalConventionSetBuilder` (for relational providers). - /// - /// /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// + /// + /// Database providers should implement this service by inheriting from either + /// this class (for non-relational providers) or `RelationalConventionSetBuilder` (for relational providers). + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public class ProviderConventionSetBuilder : IProviderConventionSetBuilder { diff --git a/src/EFCore/Metadata/Conventions/Infrastructure/ProviderConventionSetBuilderDependencies.cs b/src/EFCore/Metadata/Conventions/Infrastructure/ProviderConventionSetBuilderDependencies.cs index 1ddde518bf3..eaaaf3f7f9d 100644 --- a/src/EFCore/Metadata/Conventions/Infrastructure/ProviderConventionSetBuilderDependencies.cs +++ b/src/EFCore/Metadata/Conventions/Infrastructure/ProviderConventionSetBuilderDependencies.cs @@ -19,6 +19,8 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// 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 @@ -39,36 +41,25 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record ProviderConventionSetBuilderDependencies { private readonly ICurrentDbContext _currentContext; /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ProviderConventionSetBuilderDependencies( ITypeMappingSource typeMappingSource, diff --git a/src/EFCore/Metadata/Conventions/Internal/ConventionContext.cs b/src/EFCore/Metadata/Conventions/Internal/ConventionContext.cs index 79824493719..43cacbaa11f 100644 --- a/src/EFCore/Metadata/Conventions/Internal/ConventionContext.cs +++ b/src/EFCore/Metadata/Conventions/Internal/ConventionContext.cs @@ -45,13 +45,11 @@ public virtual void StopProcessing() } /// - /// - /// Calling this will prevent further processing of the associated event by other conventions. - /// - /// - /// The common use case is when the metadata object was removed or replaced by the convention. - /// + /// Calling this will prevent further processing of the associated event by other conventions. /// + /// + /// The common use case is when the metadata object was removed or replaced by the convention. + /// /// The new metadata object or . public virtual void StopProcessing(TMetadata? result) { @@ -60,14 +58,12 @@ public virtual void StopProcessing(TMetadata? result) } /// - /// - /// Calling this will prevent further processing of the associated event by other conventions - /// if the given objects are different. - /// - /// - /// The common use case is when the metadata object was replaced by the convention. - /// + /// Calling this will prevent further processing of the associated event by other conventions + /// if the given objects are different. /// + /// + /// The common use case is when the metadata object was replaced by the convention. + /// /// The new metadata object or . public virtual void StopProcessingIfChanged(TMetadata? result) { @@ -78,14 +74,12 @@ public virtual void StopProcessingIfChanged(TMetadata? result) } /// - /// - /// Prevents conventions from being executed immediately when a metadata aspect is modified. All the delayed conventions - /// will be executed after the returned object is disposed. - /// - /// - /// This is useful when performing multiple operations that depend on each other. - /// + /// Prevents conventions from being executed immediately when a metadata aspect is modified. All the delayed conventions + /// will be executed after the returned object is disposed. /// + /// + /// This is useful when performing multiple operations that depend on each other. + /// /// An object that should be disposed to execute the delayed conventions. public virtual IConventionBatch DelayConventions() => _dispatcher.DelayConventions(); diff --git a/src/EFCore/Metadata/Conventions/Internal/RuntimeConventionSetBuilder.cs b/src/EFCore/Metadata/Conventions/Internal/RuntimeConventionSetBuilder.cs index a2f4f2a1249..0e757c64af4 100644 --- a/src/EFCore/Metadata/Conventions/Internal/RuntimeConventionSetBuilder.cs +++ b/src/EFCore/Metadata/Conventions/Internal/RuntimeConventionSetBuilder.cs @@ -9,20 +9,18 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means that each instance will use its own - /// set of instances of this service. - /// The implementations may depend on other services registered with any lifetime. - /// The implementations do not need to be thread-safe. - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means that each instance will use its own + /// set of instances of this service. + /// The implementations may depend on other services registered with any lifetime. + /// The implementations do not need to be thread-safe. + /// public class RuntimeConventionSetBuilder : IConventionSetBuilder { private readonly IProviderConventionSetBuilder _conventionSetBuilder; diff --git a/src/EFCore/Metadata/Conventions/KeyDiscoveryConvention.cs b/src/EFCore/Metadata/Conventions/KeyDiscoveryConvention.cs index c6faf203462..2430ec19b0e 100644 --- a/src/EFCore/Metadata/Conventions/KeyDiscoveryConvention.cs +++ b/src/EFCore/Metadata/Conventions/KeyDiscoveryConvention.cs @@ -12,11 +12,11 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions { /// - /// - /// A convention that finds primary key property for the entity type based on the names, ignoring case: - /// * Id - /// * [entity name]Id - /// + /// A convention that finds primary key property for the entity type based on the names, ignoring case: + /// * Id + /// * [entity name]Id + /// + /// /// /// If the entity type is owned through a reference navigation property then the corresponding foreign key /// properties are used. @@ -25,9 +25,9 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions /// If the entity type is owned through a collection navigation property then a composite primary key /// is configured using the foreign key properties with an extra property that matches the naming convention above. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public class KeyDiscoveryConvention : IEntityTypeAddedConvention, diff --git a/src/EFCore/Metadata/IConstructorBindingFactory.cs b/src/EFCore/Metadata/IConstructorBindingFactory.cs index ad5fc0fcca1..20836ea4514 100644 --- a/src/EFCore/Metadata/IConstructorBindingFactory.cs +++ b/src/EFCore/Metadata/IConstructorBindingFactory.cs @@ -9,18 +9,18 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// A factory for finding and creating instances for - /// a given CLR constructor. - /// + /// A factory for finding and creating instances for + /// a given CLR constructor. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Entity types with constructors for more information. + /// + /// See Entity types with constructors for more information. + /// /// public interface IConstructorBindingFactory { diff --git a/src/EFCore/Metadata/IConventionEntityType.cs b/src/EFCore/Metadata/IConventionEntityType.cs index 8240899f4ea..4a4131fa17d 100644 --- a/src/EFCore/Metadata/IConventionEntityType.cs +++ b/src/EFCore/Metadata/IConventionEntityType.cs @@ -356,15 +356,13 @@ void HasNoKey(bool? keyless, bool fromDataAnnotation = false) => FindKey(new[] { property }); /// - /// - /// Gets all keys declared on the given . - /// - /// - /// This method does not return keys declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same key more than once. - /// Use to also return keys declared on base types. - /// + /// Gets all keys declared on the given . /// + /// + /// This method does not return keys declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same key more than once. + /// Use to also return keys declared on base types. + /// /// Declared keys. new IEnumerable GetDeclaredKeys() => ((IReadOnlyEntityType)this).GetDeclaredKeys().Cast(); @@ -493,23 +491,19 @@ void HasNoKey(bool? keyless, bool fromDataAnnotation = false) => ((IReadOnlyEntityType)this).FindDeclaredForeignKeys(properties).Cast(); /// - /// - /// Gets all foreign keys declared on this entity type. - /// - /// - /// This method does not return foreign keys declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. - /// Use to also return foreign keys declared on base types. - /// + /// Gets all foreign keys declared on this entity type. /// + /// + /// This method does not return foreign keys declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. + /// Use to also return foreign keys declared on base types. + /// /// Declared foreign keys. new IEnumerable GetDeclaredForeignKeys() => ((IReadOnlyEntityType)this).GetDeclaredForeignKeys().Cast(); /// - /// - /// Gets all foreign keys declared on the types derived from this entity type. - /// + /// Gets all foreign keys declared on the types derived from this entity type. /// /// Derived foreign keys. new IEnumerable GetDerivedForeignKeys() @@ -593,29 +587,25 @@ void HasNoKey(bool? keyless, bool fromDataAnnotation = false) => (IConventionNavigation?)((IReadOnlyEntityType)this).FindDeclaredNavigation(Check.NotNull(name, nameof(name))); /// - /// - /// Gets all navigation properties declared on this entity type. - /// - /// - /// This method does not return navigation properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same navigation property more than once. - /// Use to also return navigation properties declared on base types. - /// + /// Gets all navigation properties declared on this entity type. /// + /// + /// This method does not return navigation properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same navigation property more than once. + /// Use to also return navigation properties declared on base types. + /// /// Declared navigation properties. new IEnumerable GetDeclaredNavigations() => ((IReadOnlyEntityType)this).GetDeclaredNavigations().Cast(); /// - /// - /// Gets all navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return navigation properties declared on the given entity type itself. - /// Use to return navigation properties declared on this - /// and base entity typed types. - /// + /// Gets all navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return navigation properties declared on the given entity type itself. + /// Use to return navigation properties declared on this + /// and base entity typed types. + /// /// Derived navigation properties. new IEnumerable GetDerivedNavigations() => ((IReadOnlyEntityType)this).GetDerivedNavigations().Cast(); @@ -679,29 +669,25 @@ void HasNoKey(bool? keyless, bool fromDataAnnotation = false) => (IConventionSkipNavigation?)((IReadOnlyEntityType)this).FindDeclaredSkipNavigation(name); /// - /// - /// Gets the skip navigation properties declared on this entity type. - /// - /// - /// This method does not return skip navigation properties declared declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. - /// Use to also return skip navigation properties declared on base types. - /// + /// Gets the skip navigation properties declared on this entity type. /// + /// + /// This method does not return skip navigation properties declared declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. + /// Use to also return skip navigation properties declared on base types. + /// /// Declared foreign keys. new IEnumerable GetDeclaredSkipNavigations() => ((IReadOnlyEntityType)this).GetDeclaredSkipNavigations().Cast(); /// - /// - /// Gets all skip navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return skip navigation properties declared on the given entity type itself. - /// Use to return skip navigation properties declared on this - /// and base entity typed types. - /// + /// Gets all skip navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return skip navigation properties declared on the given entity type itself. + /// Use to return skip navigation properties declared on this + /// and base entity typed types. + /// /// Derived skip navigation properties. new IEnumerable GetDerivedSkipNavigations() => ((IReadOnlyEntityType)this).GetDerivedSkipNavigations().Cast(); @@ -762,26 +748,22 @@ void HasNoKey(bool? keyless, bool fromDataAnnotation = false) bool fromDataAnnotation = false); /// - /// - /// Gets the unnamed index defined on the given property. Returns if no such index is defined. - /// - /// - /// Named indexes will not be returned even if the list of properties matches. - /// + /// Gets the unnamed index defined on the given property. Returns if no such index is defined. /// + /// + /// Named indexes will not be returned even if the list of properties matches. + /// /// The property to find the index on. /// The index, or if none is found. new IConventionIndex? FindIndex(IReadOnlyProperty property) => FindIndex(new[] { property }); /// - /// - /// Gets the unnamed index defined on the given properties. Returns if no index is defined. - /// - /// - /// Named indexes will not be returned even if the list of properties matches. - /// + /// Gets the unnamed index defined on the given properties. Returns if no index is defined. /// + /// + /// Named indexes will not be returned even if the list of properties matches. + /// /// The properties to find the index on. /// The index, or if none is found. new IConventionIndex? FindIndex(IReadOnlyList properties); @@ -794,23 +776,19 @@ void HasNoKey(bool? keyless, bool fromDataAnnotation = false) new IConventionIndex? FindIndex(string name); /// - /// - /// Gets all indexes declared on this entity type. - /// - /// - /// This method does not return indexes declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same index more than once. - /// Use to also return indexes declared on base types. - /// + /// Gets all indexes declared on this entity type. /// + /// + /// This method does not return indexes declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same index more than once. + /// Use to also return indexes declared on base types. + /// /// Declared indexes. new IEnumerable GetDeclaredIndexes() => ((IReadOnlyEntityType)this).GetDeclaredIndexes().Cast(); /// - /// - /// Gets all indexes declared on the types derived from this entity type. - /// + /// Gets all indexes declared on the types derived from this entity type. /// /// Derived indexes. new IEnumerable GetDerivedIndexes() @@ -917,68 +895,56 @@ void HasNoKey(bool? keyless, bool fromDataAnnotation = false) } /// - /// - /// Gets the property with a given name. Returns if no property with the given name is defined. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find - /// a navigation property. - /// + /// Gets the property with a given name. Returns if no property with the given name is defined. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The name of the property. /// The property, or if none is found. new IConventionProperty? FindProperty(string name); /// - /// - /// Gets the properties defined on this entity type. - /// - /// - /// This API only returns scalar properties and does not return navigation properties. Use - /// to get navigation - /// properties. - /// + /// Gets the properties defined on this entity type. /// + /// + /// This API only returns scalar properties and does not return navigation properties. Use + /// to get navigation properties. + /// /// The properties defined on this entity type. new IEnumerable GetProperties(); /// - /// - /// Gets a property on the given entity type. Returns if no property is found. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find a navigation property. - /// + /// Gets a property on the given entity type. Returns if no property is found. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The property on the entity class. /// The property, or if none is found. new IConventionProperty? FindProperty(MemberInfo memberInfo) => (IConventionProperty?)((IReadOnlyEntityType)this).FindProperty(memberInfo); /// - /// - /// Finds matching properties on the given entity type. Returns if any property is not found. - /// - /// - /// This API only finds scalar properties and does not find navigation or service properties. - /// + /// Finds matching properties on the given entity type. Returns if any property is not found. /// + /// + /// This API only finds scalar properties and does not find navigation or service properties. + /// /// The property names. /// The properties, or if any property is not found. new IReadOnlyList? FindProperties(IReadOnlyList propertyNames) => (IReadOnlyList?)((IReadOnlyEntityType)this).FindProperties(propertyNames); /// - /// - /// Gets a property with the given name. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find a navigation property. - /// + /// Gets a property with the given name. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The property name. /// The property, or if none is found. new IConventionProperty GetProperty(string name) @@ -994,29 +960,25 @@ void HasNoKey(bool? keyless, bool fromDataAnnotation = false) => (IConventionProperty?)((IReadOnlyEntityType)this).FindDeclaredProperty(name); /// - /// - /// Gets all non-navigation properties declared on this entity type. - /// - /// - /// This method does not return properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same property more than once. - /// Use to also return properties declared on base types. - /// + /// Gets all non-navigation properties declared on this entity type. /// + /// + /// This method does not return properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same property more than once. + /// Use to also return properties declared on base types. + /// /// Declared non-navigation properties. new IEnumerable GetDeclaredProperties() => ((IReadOnlyEntityType)this).GetDeclaredProperties().Cast(); /// - /// - /// Gets all non-navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return properties declared on the given entity type itself. - /// Use to return properties declared on this - /// and base entity typed types. - /// + /// Gets all non-navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return properties declared on the given entity type itself. + /// Use to return properties declared on this + /// and base entity typed types. + /// /// Derived non-navigation properties. new IEnumerable GetDerivedProperties() => ((IReadOnlyEntityType)this).GetDerivedProperties().Cast(); @@ -1044,54 +1006,46 @@ void HasNoKey(bool? keyless, bool fromDataAnnotation = false) IConventionServiceProperty AddServiceProperty(MemberInfo memberInfo, bool fromDataAnnotation = false); /// - /// - /// Gets the service property with a given name. - /// Returns if no property with the given name is defined. - /// - /// - /// This API only finds service properties and does not find scalar or navigation properties. - /// + /// Gets the service property with a given name. + /// Returns if no property with the given name is defined. /// + /// + /// This API only finds service properties and does not find scalar or navigation properties. + /// /// The name of the service property. /// The service property, or if none is found. new IConventionServiceProperty? FindServiceProperty(string name); /// - /// - /// Gets all service properties declared on this entity type. - /// - /// - /// This method does not return properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same property more than once. - /// Use to also return properties declared on base types. - /// + /// Gets all service properties declared on this entity type. /// + /// + /// This method does not return properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same property more than once. + /// Use to also return properties declared on base types. + /// /// Declared service properties. new IEnumerable GetDeclaredServiceProperties() => ((IReadOnlyEntityType)this).GetDeclaredServiceProperties().Cast(); /// - /// - /// Gets all service properties declared on the types derived from this entity type. - /// - /// - /// This method does not return service properties declared on the given entity type itself. - /// Use to return service properties declared on this - /// and base entity typed types. - /// + /// Gets all service properties declared on the types derived from this entity type. /// + /// + /// This method does not return service properties declared on the given entity type itself. + /// Use to return service properties declared on this + /// and base entity typed types. + /// /// Derived service properties. new IEnumerable GetDerivedServiceProperties() => ((IReadOnlyEntityType)this).GetDerivedServiceProperties().Cast(); /// - /// - /// Gets all the service properties defined on this entity type. - /// - /// - /// This API only returns service properties and does not return scalar or navigation properties. - /// + /// Gets all the service properties defined on this entity type. /// + /// + /// This API only returns service properties and does not return scalar or navigation properties. + /// /// The service properties defined on this entity type. new IEnumerable GetServiceProperties(); diff --git a/src/EFCore/Metadata/IConventionForeignKey.cs b/src/EFCore/Metadata/IConventionForeignKey.cs index 9331ebf2bcc..879a4d40462 100644 --- a/src/EFCore/Metadata/IConventionForeignKey.cs +++ b/src/EFCore/Metadata/IConventionForeignKey.cs @@ -10,17 +10,17 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a relationship where a foreign key property(s) in a dependent entity type - /// reference a corresponding primary or alternate key in a principal entity type. - /// + /// Represents a relationship where a foreign key property(s) in a dependent entity type + /// reference a corresponding primary or alternate key in a principal entity type. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionForeignKey : IReadOnlyForeignKey, IConventionAnnotatable { diff --git a/src/EFCore/Metadata/IConventionIndex.cs b/src/EFCore/Metadata/IConventionIndex.cs index a373624ab29..9eaa441c8fd 100644 --- a/src/EFCore/Metadata/IConventionIndex.cs +++ b/src/EFCore/Metadata/IConventionIndex.cs @@ -8,16 +8,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents an index on a set of properties. - /// + /// Represents an index on a set of properties. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionIndex : IReadOnlyIndex, IConventionAnnotatable { diff --git a/src/EFCore/Metadata/IConventionKey.cs b/src/EFCore/Metadata/IConventionKey.cs index 2e993c980d0..31a379375cc 100644 --- a/src/EFCore/Metadata/IConventionKey.cs +++ b/src/EFCore/Metadata/IConventionKey.cs @@ -9,16 +9,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a primary or alternate key on an entity. - /// + /// Represents a primary or alternate key on an entity. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionKey : IReadOnlyKey, IConventionAnnotatable { diff --git a/src/EFCore/Metadata/IConventionModel.cs b/src/EFCore/Metadata/IConventionModel.cs index ffa04052920..743ed3c5dcd 100644 --- a/src/EFCore/Metadata/IConventionModel.cs +++ b/src/EFCore/Metadata/IConventionModel.cs @@ -10,19 +10,19 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Metadata about the shape of entities, the relationships between them, and how they map to - /// the database. A model is typically created by overriding the - /// method on a derived - /// . - /// + /// Metadata about the shape of entities, the relationships between them, and how they map to + /// the database. A model is typically created by overriding the + /// method on a derived + /// . + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionModel : IReadOnlyModel, IConventionAnnotatable { @@ -32,28 +32,24 @@ public interface IConventionModel : IReadOnlyModel, IConventionAnnotatable new IConventionModelBuilder Builder { get; } /// - /// - /// Prevents conventions from being executed immediately when a metadata aspect is modified. All the delayed conventions - /// will be executed after the returned object is disposed. - /// - /// - /// This is useful when performing multiple operations that depend on each other. - /// + /// Prevents conventions from being executed immediately when a metadata aspect is modified. All the delayed conventions + /// will be executed after the returned object is disposed. /// + /// + /// This is useful when performing multiple operations that depend on each other. + /// /// An object that should be disposed to execute the delayed conventions. IConventionBatch DelayConventions(); /// - /// - /// Sets the to use for properties of all entity types - /// in this model. - /// - /// - /// Note that individual entity types can override this access mode, and individual properties of - /// entity types can override the access mode set on the entity type. The value set here will - /// be used for any property for which no override has been specified. - /// + /// Sets the to use for properties of all entity types + /// in this model. /// + /// + /// Note that individual entity types can override this access mode, and individual properties of + /// entity types can override the access mode set on the entity type. The value set here will + /// be used for any property for which no override has been specified. + /// /// The , or to clear the mode set. /// Indicates whether the configuration was specified using a data annotation. /// The configured value. @@ -81,14 +77,12 @@ public interface IConventionModel : IReadOnlyModel, IConventionAnnotatable ConfigurationSource? GetChangeTrackingStrategyConfigurationSource(); /// - /// - /// Adds a state entity type of default type to the model. - /// - /// - /// Shadow entities are not currently supported in a model that is used at runtime with a . - /// Therefore, shadow state entity types will only exist in migration model snapshots, etc. - /// + /// Adds a state entity type of default type to the model. /// + /// + /// Shadow entities are not currently supported in a model that is used at runtime with a . + /// Therefore, shadow state entity types will only exist in migration model snapshots, etc. + /// /// The name of the entity to be added. /// Indicates whether the configuration was specified using a data annotation. /// The new entity type. @@ -103,14 +97,12 @@ public interface IConventionModel : IReadOnlyModel, IConventionAnnotatable IConventionEntityType? AddEntityType(Type type, bool fromDataAnnotation = false); /// - /// - /// Adds a shared type entity type to the model. - /// - /// - /// Shared type entity type is an entity type which can share CLR type with other types in the model but has - /// a unique name and always identified by the name. - /// + /// Adds a shared type entity type to the model. /// + /// + /// Shared type entity type is an entity type which can share CLR type with other types in the model but has + /// a unique name and always identified by the name. + /// /// The name of the entity to be added. /// The CLR class that is used to represent instances of the entity type. /// Indicates whether the configuration was specified using a data annotation. @@ -146,14 +138,12 @@ public interface IConventionModel : IReadOnlyModel, IConventionAnnotatable bool fromDataAnnotation = false); /// - /// - /// Adds an owned entity type of default type to the model. - /// - /// - /// Shadow entities are not currently supported in a model that is used at runtime with a . - /// Therefore, shadow state entity types will only exist in migration model snapshots, etc. - /// + /// Adds an owned entity type of default type to the model. /// + /// + /// Shadow entities are not currently supported in a model that is used at runtime with a . + /// Therefore, shadow state entity types will only exist in migration model snapshots, etc. + /// /// The name of the entity to be added. /// Indicates whether the configuration was specified using a data annotation. /// The new entity type. @@ -168,14 +158,12 @@ public interface IConventionModel : IReadOnlyModel, IConventionAnnotatable IConventionEntityType? AddOwnedEntityType(Type type, bool fromDataAnnotation = false); /// - /// - /// Adds an owned shared type entity type to the model. - /// - /// - /// Shared type entity type is an entity type which can share CLR type with other types in the model but has - /// a unique name and always identified by the name. - /// + /// Adds an owned shared type entity type to the model. /// + /// + /// Shared type entity type is an entity type which can share CLR type with other types in the model but has + /// a unique name and always identified by the name. + /// /// The name of the entity to be added. /// The CLR class that is used to represent instances of the entity type. /// Indicates whether the configuration was specified using a data annotation. diff --git a/src/EFCore/Metadata/IConventionNavigation.cs b/src/EFCore/Metadata/IConventionNavigation.cs index 05220dca2e7..9afe4915b4c 100644 --- a/src/EFCore/Metadata/IConventionNavigation.cs +++ b/src/EFCore/Metadata/IConventionNavigation.cs @@ -9,16 +9,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a navigation property which can be used to navigate a relationship. - /// + /// Represents a navigation property which can be used to navigate a relationship. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionNavigation : IReadOnlyNavigation, IConventionNavigationBase { diff --git a/src/EFCore/Metadata/IConventionNavigationBase.cs b/src/EFCore/Metadata/IConventionNavigationBase.cs index f110386b680..952956a9515 100644 --- a/src/EFCore/Metadata/IConventionNavigationBase.cs +++ b/src/EFCore/Metadata/IConventionNavigationBase.cs @@ -6,16 +6,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a navigation property which can be used to navigate a relationship. - /// + /// Represents a navigation property which can be used to navigate a relationship. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionNavigationBase : IReadOnlyNavigationBase, IConventionPropertyBase { diff --git a/src/EFCore/Metadata/IConventionProperty.cs b/src/EFCore/Metadata/IConventionProperty.cs index d6008c29cde..7322500f51b 100644 --- a/src/EFCore/Metadata/IConventionProperty.cs +++ b/src/EFCore/Metadata/IConventionProperty.cs @@ -13,16 +13,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a scalar property of an entity type. - /// + /// Represents a scalar property of an entity type. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionProperty : IReadOnlyProperty, IConventionPropertyBase { @@ -239,10 +239,10 @@ bool IsImplicitlyCreated() ConfigurationSource? GetIsUnicodeConfigurationSource(); /// - /// - /// Sets a value indicating whether this property can be modified before the entity is - /// saved to the database. - /// + /// Sets a value indicating whether this property can be modified before the entity is + /// saved to the database. + /// + /// /// /// If , then an exception /// will be thrown if a value is assigned to this property when it is in @@ -252,7 +252,7 @@ bool IsImplicitlyCreated() /// If , then any value /// set will be ignored when it is in the state. /// - /// + /// /// /// A value indicating whether this property can be modified before the entity is /// saved to the database. to reset to default. @@ -268,10 +268,10 @@ bool IsImplicitlyCreated() ConfigurationSource? GetBeforeSaveBehaviorConfigurationSource(); /// - /// - /// Sets a value indicating whether this property can be modified after the entity is - /// saved to the database. - /// + /// Sets a value indicating whether this property can be modified after the entity is + /// saved to the database. + /// + /// /// /// If , then an exception /// will be thrown if a new value is assigned to this property after the entity exists in the database. @@ -280,7 +280,7 @@ bool IsImplicitlyCreated() /// If , then any modification to the /// property value of an entity that already exists in the database will be ignored. /// - /// + /// /// /// Sets a value indicating whether this property can be modified after the entity is /// saved to the database. to reset to default. @@ -296,14 +296,12 @@ bool IsImplicitlyCreated() ConfigurationSource? GetAfterSaveBehaviorConfigurationSource(); /// - /// - /// Sets the factory to use for generating values for this property, or to clear any previously set factory. - /// - /// - /// Setting does not disable value generation for this property, it just clears any generator explicitly - /// configured for this property. The database provider may still have a value generator for the property type. - /// + /// Sets the factory to use for generating values for this property, or to clear any previously set factory. /// + /// + /// Setting does not disable value generation for this property, it just clears any generator explicitly + /// configured for this property. The database provider may still have a value generator for the property type. + /// /// /// A factory that will be used to create the value generator, or to /// clear any previously set factory. @@ -315,14 +313,12 @@ bool IsImplicitlyCreated() bool fromDataAnnotation = false); /// - /// - /// Sets the factory to use for generating values for this property, or to clear any previously set factory. - /// - /// - /// Setting does not disable value generation for this property, it just clears any generator explicitly - /// configured for this property. The database provider may still have a value generator for the property type. - /// + /// Sets the factory to use for generating values for this property, or to clear any previously set factory. /// + /// + /// Setting does not disable value generation for this property, it just clears any generator explicitly + /// configured for this property. The database provider may still have a value generator for the property type. + /// /// /// A factory that will be used to create the value generator, or to /// clear any previously set factory. diff --git a/src/EFCore/Metadata/IConventionPropertyBase.cs b/src/EFCore/Metadata/IConventionPropertyBase.cs index 90ae83b98d7..404f09aa96c 100644 --- a/src/EFCore/Metadata/IConventionPropertyBase.cs +++ b/src/EFCore/Metadata/IConventionPropertyBase.cs @@ -7,16 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Base type for navigation and scalar properties. - /// + /// Base type for navigation and scalar properties. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionPropertyBase : IReadOnlyPropertyBase, IConventionAnnotatable { @@ -32,32 +32,28 @@ public interface IConventionPropertyBase : IReadOnlyPropertyBase, IConventionAnn ConfigurationSource GetConfigurationSource(); /// - /// - /// Sets the for the underlying CLR field that this property should use. - /// - /// - /// By default, the backing field, if one is found or has been specified, is used when - /// new objects are constructed, typically when entities are queried from the database. - /// Properties are used for all other accesses. This can be changed by calling - /// . - /// + /// Sets the for the underlying CLR field that this property should use. /// + /// + /// By default, the backing field, if one is found or has been specified, is used when + /// new objects are constructed, typically when entities are queried from the database. + /// Properties are used for all other accesses. This can be changed by calling + /// . + /// /// The for the underlying CLR field to use. /// Indicates whether the configuration was specified using a data annotation. /// The new . FieldInfo? SetFieldInfo(FieldInfo? fieldInfo, bool fromDataAnnotation = false); /// - /// - /// Sets the for the underlying CLR field that this property should use. - /// - /// - /// By default, the backing field, if one is found or has been specified, is used when - /// new objects are constructed, typically when entities are queried from the database. - /// Properties are used for all other accesses. This can be changed by calling - /// . - /// + /// Sets the for the underlying CLR field that this property should use. /// + /// + /// By default, the backing field, if one is found or has been specified, is used when + /// new objects are constructed, typically when entities are queried from the database. + /// Properties are used for all other accesses. This can be changed by calling + /// . + /// /// The for the underlying CLR field to use. /// Indicates whether the configuration was specified using a data annotation. [Obsolete("Use SetFieldInfo")] @@ -65,10 +61,10 @@ void SetField(FieldInfo? fieldInfo, bool fromDataAnnotation = false) => SetFieldInfo(fieldInfo, fromDataAnnotation); /// - /// - /// Sets the underlying CLR field that this property should use. - /// This may be for shadow properties or if the backing field for the property is not known. - /// + /// Sets the underlying CLR field that this property should use. + /// This may be for shadow properties or if the backing field for the property is not known. + /// + /// /// /// Backing fields are normally found by convention as described /// here: http://go.microsoft.com/fwlink/?LinkId=723277. @@ -81,7 +77,7 @@ void SetField(FieldInfo? fieldInfo, bool fromDataAnnotation = false) /// Properties are used for all other accesses. This can be changed by calling /// . /// - /// + /// /// The name of the field to use. /// Indicates whether the configuration was specified using a data annotation. /// The new . diff --git a/src/EFCore/Metadata/IConventionServiceProperty.cs b/src/EFCore/Metadata/IConventionServiceProperty.cs index b6850fcd762..75ef7e87e52 100644 --- a/src/EFCore/Metadata/IConventionServiceProperty.cs +++ b/src/EFCore/Metadata/IConventionServiceProperty.cs @@ -7,17 +7,17 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// A in the Entity Framework model that represents an - /// injected service from the . - /// + /// A in the Entity Framework model that represents an + /// injected service from the . + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionServiceProperty : IReadOnlyServiceProperty, IConventionPropertyBase { diff --git a/src/EFCore/Metadata/IConventionSkipNavigation.cs b/src/EFCore/Metadata/IConventionSkipNavigation.cs index f7fd2613a1d..3ae4984e3a4 100644 --- a/src/EFCore/Metadata/IConventionSkipNavigation.cs +++ b/src/EFCore/Metadata/IConventionSkipNavigation.cs @@ -8,17 +8,17 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a navigation property that is part of a relationship - /// that is forwarded through a third entity type. - /// + /// Represents a navigation property that is part of a relationship + /// that is forwarded through a third entity type. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionSkipNavigation : IReadOnlySkipNavigation, IConventionNavigationBase { diff --git a/src/EFCore/Metadata/IConventionTypeBase.cs b/src/EFCore/Metadata/IConventionTypeBase.cs index 8e16cdbd65e..949fe361682 100644 --- a/src/EFCore/Metadata/IConventionTypeBase.cs +++ b/src/EFCore/Metadata/IConventionTypeBase.cs @@ -7,16 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a type in an . - /// + /// Represents a type in an . + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Model building conventions for more information. + /// + /// See Model building conventions for more information. + /// /// public interface IConventionTypeBase : IReadOnlyTypeBase, IConventionAnnotatable { @@ -66,14 +66,12 @@ bool IsIgnored(string memberName) => FindIgnoredConfigurationSource(memberName) != null; /// - /// - /// Sets the to use for properties of this type. - /// - /// - /// Note that individual properties and navigations can override this access mode. The value set here will - /// be used for any property or navigation for which no override has been specified. - /// + /// Sets the to use for properties of this type. /// + /// + /// Note that individual properties and navigations can override this access mode. The value set here will + /// be used for any property or navigation for which no override has been specified. + /// /// The , or to clear the mode set. /// Indicates whether the configuration was specified using a data annotation. /// The configured value. @@ -89,14 +87,12 @@ bool IsIgnored(string memberName) => FindAnnotation(CoreAnnotationNames.PropertyAccessMode)?.GetConfigurationSource(); /// - /// - /// Sets the to use for navigations of this entity type. - /// - /// - /// Note that individual navigations can override this access mode. The value set here will - /// be used for any navigation for which no override has been specified. - /// + /// Sets the to use for navigations of this entity type. /// + /// + /// Note that individual navigations can override this access mode. The value set here will + /// be used for any navigation for which no override has been specified. + /// /// The , or to clear the mode set. /// Indicates whether the configuration was specified using a data annotation. /// The configured value. diff --git a/src/EFCore/Metadata/IDesignTimeModel.cs b/src/EFCore/Metadata/IDesignTimeModel.cs index b5e33ce0afe..01dbf6c5b59 100644 --- a/src/EFCore/Metadata/IDesignTimeModel.cs +++ b/src/EFCore/Metadata/IDesignTimeModel.cs @@ -6,20 +6,20 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// The metadata about the shape of entities, the relationships between them, and how they map to the database. - /// Also includes all the information necessary to initialize the database. - /// + /// The metadata about the shape of entities, the relationships between them, and how they map to the database. + /// Also includes all the information necessary to initialize the database. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IDesignTimeModel { diff --git a/src/EFCore/Metadata/IEntityType.cs b/src/EFCore/Metadata/IEntityType.cs index 71dc9eba7e5..835af668152 100644 --- a/src/EFCore/Metadata/IEntityType.cs +++ b/src/EFCore/Metadata/IEntityType.cs @@ -146,15 +146,13 @@ public interface IEntityType : IReadOnlyEntityType, ITypeBase new IKey? FindKey(IReadOnlyList properties); /// - /// - /// Gets all keys declared on the given . - /// - /// - /// This method does not return keys declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same key more than once. - /// Use to also return keys declared on base types. - /// + /// Gets all keys declared on the given . /// + /// + /// This method does not return keys declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same key more than once. + /// Use to also return keys declared on base types. + /// /// Declared keys. new IEnumerable GetDeclaredKeys(); @@ -224,22 +222,18 @@ public interface IEntityType : IReadOnlyEntityType, ITypeBase new IEnumerable FindDeclaredForeignKeys(IReadOnlyList properties); /// - /// - /// Gets all foreign keys declared on the given . - /// - /// - /// This method does not return foreign keys declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. - /// Use to also return foreign keys declared on base types. - /// + /// Gets all foreign keys declared on the given . /// + /// + /// This method does not return foreign keys declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. + /// Use to also return foreign keys declared on base types. + /// /// Declared foreign keys. new IEnumerable GetDeclaredForeignKeys(); /// - /// - /// Gets all foreign keys declared on the types derived from the given . - /// + /// Gets all foreign keys declared on the types derived from the given . /// /// Derived foreign keys. new IEnumerable GetDerivedForeignKeys(); @@ -296,28 +290,24 @@ public interface IEntityType : IReadOnlyEntityType, ITypeBase new INavigation? FindDeclaredNavigation(string name); /// - /// - /// Gets all navigation properties declared on the given . - /// - /// - /// This method does not return navigation properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same navigation property more than once. - /// Use to also return navigation properties declared on base types. - /// + /// Gets all navigation properties declared on the given . /// + /// + /// This method does not return navigation properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same navigation property more than once. + /// Use to also return navigation properties declared on base types. + /// /// Declared navigation properties. new IEnumerable GetDeclaredNavigations(); /// - /// - /// Gets all navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return navigation properties declared on the given entity type itself. - /// Use to return navigation properties declared on this - /// and base entity typed types. - /// + /// Gets all navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return navigation properties declared on the given entity type itself. + /// Use to return navigation properties declared on this + /// and base entity typed types. + /// /// Derived navigation properties. new IEnumerable GetDerivedNavigations() => ((IReadOnlyEntityType)this).GetDerivedNavigations().Cast(); @@ -353,29 +343,25 @@ public interface IEntityType : IReadOnlyEntityType, ITypeBase => (ISkipNavigation?)((IReadOnlyEntityType)this).FindDeclaredSkipNavigation(name); /// - /// - /// Gets all skip navigation properties declared on this entity type. - /// - /// - /// This method does not return skip navigation properties declared declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. - /// Use to also return skip navigation properties declared on base types. - /// + /// Gets all skip navigation properties declared on this entity type. /// + /// + /// This method does not return skip navigation properties declared declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. + /// Use to also return skip navigation properties declared on base types. + /// /// Declared foreign keys. new IEnumerable GetDeclaredSkipNavigations() => ((IReadOnlyEntityType)this).GetDeclaredSkipNavigations().Cast(); /// - /// - /// Gets all skip navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return skip navigation properties declared on the given entity type itself. - /// Use to return skip navigation properties declared on this - /// and base entity typed types. - /// + /// Gets all skip navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return skip navigation properties declared on the given entity type itself. + /// Use to return skip navigation properties declared on this + /// and base entity typed types. + /// /// Derived skip navigation properties. new IEnumerable GetDerivedSkipNavigations() => ((IReadOnlyEntityType)this).GetDerivedSkipNavigations().Cast(); @@ -387,13 +373,11 @@ public interface IEntityType : IReadOnlyEntityType, ITypeBase new IEnumerable GetSkipNavigations(); /// - /// - /// Gets the unnamed index defined on the given properties. Returns if no such index is defined. - /// - /// - /// Named indexes will not be returned even if the list of properties matches. - /// + /// Gets the unnamed index defined on the given properties. Returns if no such index is defined. /// + /// + /// Named indexes will not be returned even if the list of properties matches. + /// /// The properties to find the index on. /// The index, or if none is found. new IIndex? FindIndex(IReadOnlyList properties); @@ -414,22 +398,18 @@ public interface IEntityType : IReadOnlyEntityType, ITypeBase => FindIndex(new[] { property }); /// - /// - /// Gets all indexes declared on the given . - /// - /// - /// This method does not return indexes declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same index more than once. - /// Use to also return indexes declared on base types. - /// + /// Gets all indexes declared on the given . /// + /// + /// This method does not return indexes declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same index more than once. + /// Use to also return indexes declared on base types. + /// /// Declared indexes. new IEnumerable GetDeclaredIndexes(); /// - /// - /// Gets all indexes declared on the types derived from the given . - /// + /// Gets all indexes declared on the types derived from the given . /// /// Derived indexes. new IEnumerable GetDerivedIndexes(); @@ -441,40 +421,34 @@ public interface IEntityType : IReadOnlyEntityType, ITypeBase new IEnumerable GetIndexes(); /// - /// - /// Gets a property on the given entity type. Returns if no property is found. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find a navigation property. - /// + /// Gets a property on the given entity type. Returns if no property is found. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The property on the entity class. /// The property, or if none is found. new IProperty? FindProperty(MemberInfo memberInfo) => (IProperty?)((IReadOnlyEntityType)this).FindProperty(memberInfo); /// - /// - /// Gets the property with a given name. Returns if no property with the given name is defined. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find a navigation property. - /// + /// Gets the property with a given name. Returns if no property with the given name is defined. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The name of the property. /// The property, or if none is found. new IProperty? FindProperty(string name); /// - /// - /// Finds matching properties on the given entity type. Returns if any property is not found. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. - /// + /// Finds matching properties on the given entity type. Returns if any property is not found. /// + /// + /// This API only finds scalar properties and does not find navigation properties. + /// /// The property names. /// The properties, or if any property is not found. new IReadOnlyList? FindProperties( @@ -482,14 +456,12 @@ public interface IEntityType : IReadOnlyEntityType, ITypeBase => (IReadOnlyList?)((IReadOnlyEntityType)this).FindProperties(propertyNames); /// - /// - /// Gets a property with the given name. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find a navigation property. - /// + /// Gets a property with the given name. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The property name. /// The property, or if none is found. new IProperty GetProperty(string name) @@ -504,41 +476,35 @@ public interface IEntityType : IReadOnlyEntityType, ITypeBase new IProperty? FindDeclaredProperty(string name); /// - /// - /// Gets all non-navigation properties declared on the given . - /// - /// - /// This method does not return properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same property more than once. - /// Use to also return properties declared on base types. - /// + /// Gets all non-navigation properties declared on the given . /// + /// + /// This method does not return properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same property more than once. + /// Use to also return properties declared on base types. + /// /// Declared non-navigation properties. new IEnumerable GetDeclaredProperties(); /// - /// - /// Gets all non-navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return properties declared on the given entity type itself. - /// Use to return properties declared on this - /// and base entity typed types. - /// + /// Gets all non-navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return properties declared on the given entity type itself. + /// Use to return properties declared on this + /// and base entity typed types. + /// /// Derived non-navigation properties. new IEnumerable GetDerivedProperties() => ((IReadOnlyEntityType)this).GetDerivedProperties().Cast(); /// - /// - /// Gets the properties defined on this entity type. - /// - /// - /// This API only returns scalar properties and does not return navigation properties. Use - /// to get navigation properties. - /// + /// Gets the properties defined on this entity type. /// + /// + /// This API only returns scalar properties and does not return navigation properties. Use + /// to get navigation properties. + /// /// The properties defined on this entity type. new IEnumerable GetProperties(); @@ -556,53 +522,45 @@ public interface IEntityType : IReadOnlyEntityType, ITypeBase IEnumerable GetValueGeneratingProperties(); /// - /// - /// Gets the service property with a given name. - /// Returns if no property with the given name is defined. - /// - /// - /// This API only finds service properties and does not find scalar or navigation properties. - /// + /// Gets the service property with a given name. + /// Returns if no property with the given name is defined. /// + /// + /// This API only finds service properties and does not find scalar or navigation properties. + /// /// The name of the service property. /// The service property, or if none is found. new IServiceProperty? FindServiceProperty(string name); /// - /// - /// Gets all service properties declared on the given . - /// - /// - /// This method does not return properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same property more than once. - /// Use to also return properties declared on base types. - /// + /// Gets all service properties declared on the given . /// + /// + /// This method does not return properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same property more than once. + /// Use to also return properties declared on base types. + /// /// Declared service properties. new IEnumerable GetDeclaredServiceProperties(); /// - /// - /// Gets all service properties declared on the types derived from this entity type. - /// - /// - /// This method does not return service properties declared on the given entity type itself. - /// Use to return service properties declared on this - /// and base entity typed types. - /// + /// Gets all service properties declared on the types derived from this entity type. /// + /// + /// This method does not return service properties declared on the given entity type itself. + /// Use to return service properties declared on this + /// and base entity typed types. + /// /// Derived service properties. new IEnumerable GetDerivedServiceProperties() => ((IReadOnlyEntityType)this).GetDerivedServiceProperties().Cast(); /// - /// - /// Gets all the defined on this entity type. - /// - /// - /// This API only returns service properties and does not return scalar or navigation properties. - /// + /// Gets all the defined on this entity type. /// + /// + /// This API only returns service properties and does not return scalar or navigation properties. + /// /// The service properties defined on this entity type. new IEnumerable GetServiceProperties(); } diff --git a/src/EFCore/Metadata/IModel.cs b/src/EFCore/Metadata/IModel.cs index 64fa390afa3..d68a985f1c9 100644 --- a/src/EFCore/Metadata/IModel.cs +++ b/src/EFCore/Metadata/IModel.cs @@ -16,21 +16,21 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Metadata about the shape of entities, the relationships between them, and how they map to - /// the database. A model is typically created by overriding the - /// method on a derived - /// . - /// + /// Metadata about the shape of entities, the relationships between them, and how they map to + /// the database. A model is typically created by overriding the + /// method on a derived + /// . + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IModel : IReadOnlyModel, IAnnotatable { diff --git a/src/EFCore/Metadata/IMutableEntityType.cs b/src/EFCore/Metadata/IMutableEntityType.cs index e5b04cd29ce..cfc3b07ef3e 100644 --- a/src/EFCore/Metadata/IMutableEntityType.cs +++ b/src/EFCore/Metadata/IMutableEntityType.cs @@ -14,15 +14,13 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents an entity type in an . - /// - /// - /// This interface is used during model creation and allows the metadata to be modified. - /// Once the model is built, represents a read-only view of the same metadata. - /// + /// Represents an entity type in an . /// /// + /// This interface is used during model creation and allows the metadata to be modified. + /// Once the model is built, represents a read-only view of the same metadata. + /// + /// /// See Modeling entity types and relationships for more information. /// public interface IMutableEntityType : IReadOnlyEntityType, IMutableTypeBase @@ -245,15 +243,13 @@ IMutableKey AddKey(IMutableProperty property) new IMutableKey? FindKey(IReadOnlyList properties); /// - /// - /// Gets all keys declared on the given . - /// - /// - /// This method does not return keys declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same key more than once. - /// Use to also return keys declared on base types. - /// + /// Gets all keys declared on the given . /// + /// + /// This method does not return keys declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same key more than once. + /// Use to also return keys declared on base types. + /// /// Declared keys. new IEnumerable GetDeclaredKeys() => ((IReadOnlyEntityType)this).GetDeclaredKeys().Cast(); @@ -374,23 +370,19 @@ IMutableForeignKey AddForeignKey( => ((IReadOnlyEntityType)this).FindDeclaredForeignKeys(properties).Cast(); /// - /// - /// Gets all foreign keys declared on this entity type. - /// - /// - /// This method does not return foreign keys declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. - /// Use to also return foreign keys declared on base types. - /// + /// Gets all foreign keys declared on this entity type. /// + /// + /// This method does not return foreign keys declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. + /// Use to also return foreign keys declared on base types. + /// /// Declared foreign keys. new IEnumerable GetDeclaredForeignKeys() => ((IReadOnlyEntityType)this).GetDeclaredForeignKeys().Cast(); /// - /// - /// Gets all foreign keys declared on the types derived from this entity type. - /// + /// Gets all foreign keys declared on the types derived from this entity type. /// /// Derived foreign keys. new IEnumerable GetDerivedForeignKeys() @@ -474,29 +466,25 @@ IMutableForeignKey AddForeignKey( => (IMutableNavigation?)((IReadOnlyEntityType)this).FindDeclaredNavigation(name); /// - /// - /// Gets all navigation properties declared on this entity type. - /// - /// - /// This method does not return navigation properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same navigation property more than once. - /// Use to also return navigation properties declared on base types. - /// + /// Gets all navigation properties declared on this entity type. /// + /// + /// This method does not return navigation properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same navigation property more than once. + /// Use to also return navigation properties declared on base types. + /// /// Declared navigation properties. new IEnumerable GetDeclaredNavigations() => ((IReadOnlyEntityType)this).GetDeclaredNavigations().Cast(); /// - /// - /// Gets all navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return navigation properties declared on the given entity type itself. - /// Use to return navigation properties declared on this - /// and base entity typed types. - /// + /// Gets all navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return navigation properties declared on the given entity type itself. + /// Use to return navigation properties declared on this + /// and base entity typed types. + /// /// Derived navigation properties. new IEnumerable GetDerivedNavigations() => ((IReadOnlyEntityType)this).GetDerivedNavigations().Cast(); @@ -558,29 +546,25 @@ IMutableSkipNavigation AddSkipNavigation( => (IMutableSkipNavigation?)((IReadOnlyEntityType)this).FindDeclaredSkipNavigation(name); /// - /// - /// Gets all skip navigation properties declared on this entity type. - /// - /// - /// This method does not return skip navigation properties declared declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. - /// Use to also return skip navigation properties declared on base types. - /// + /// Gets all skip navigation properties declared on this entity type. /// + /// + /// This method does not return skip navigation properties declared declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. + /// Use to also return skip navigation properties declared on base types. + /// /// Declared foreign keys. new IEnumerable GetDeclaredSkipNavigations() => ((IReadOnlyEntityType)this).GetDeclaredSkipNavigations().Cast(); /// - /// - /// Gets all skip navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return skip navigation properties declared on the given entity type itself. - /// Use to return skip navigation properties declared on this - /// and base entity typed types. - /// + /// Gets all skip navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return skip navigation properties declared on the given entity type itself. + /// Use to return skip navigation properties declared on this + /// and base entity typed types. + /// /// Derived skip navigation properties. new IEnumerable GetDerivedSkipNavigations() => ((IReadOnlyEntityType)this).GetDerivedSkipNavigations().Cast(); @@ -639,13 +623,11 @@ IMutableIndex AddIndex(IMutableProperty property, string name) => FindIndex(new[] { property }); /// - /// - /// Gets the unnamed index defined on the given properties. Returns if no such index is defined. - /// - /// - /// Named indexes will not be returned even if the list of properties matches. - /// + /// Gets the unnamed index defined on the given properties. Returns if no such index is defined. /// + /// + /// Named indexes will not be returned even if the list of properties matches. + /// /// The properties to find the index on. /// The index, or if none is found. new IMutableIndex? FindIndex(IReadOnlyList properties); @@ -658,23 +640,19 @@ IMutableIndex AddIndex(IMutableProperty property, string name) new IMutableIndex? FindIndex(string name); /// - /// - /// Gets all indexes declared on this entity type. - /// - /// - /// This method does not return indexes declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same index more than once. - /// Use to also return indexes declared on base types. - /// + /// Gets all indexes declared on this entity type. /// + /// + /// This method does not return indexes declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same index more than once. + /// Use to also return indexes declared on base types. + /// /// Declared indexes. new IEnumerable GetDeclaredIndexes() => ((IReadOnlyEntityType)this).GetDeclaredIndexes().Cast(); /// - /// - /// Gets all indexes declared on the types derived from this entity type. - /// + /// Gets all indexes declared on the types derived from this entity type. /// /// Derived indexes. new IEnumerable GetDerivedIndexes() @@ -717,41 +695,35 @@ IMutableIndex AddIndex(IMutableProperty property, string name) IMutableProperty AddProperty(string name, Type propertyType, MemberInfo? memberInfo); /// - /// - /// Gets a property on the given entity type. Returns if no property is found. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find a navigation property. - /// + /// Gets a property on the given entity type. Returns if no property is found. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The property on the entity class. /// The property, or if none is found. new IMutableProperty? FindProperty(MemberInfo memberInfo) => (IMutableProperty?)((IReadOnlyEntityType)this).FindProperty(memberInfo); /// - /// - /// Gets the property with a given name. Returns if no property with the given name is defined. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find - /// a navigation property. - /// + /// Gets the property with a given name. Returns if no property with the given name is defined. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find + /// a navigation property. + /// /// The name of the property. /// The property, or if none is found. new IMutableProperty? FindProperty(string name); /// - /// - /// Finds matching properties on the given entity type. Returns if any property is not found. - /// - /// - /// This API only finds scalar properties and does not find navigation or service properties. - /// + /// Finds matching properties on the given entity type. Returns if any property is not found. /// + /// + /// This API only finds scalar properties and does not find navigation or service properties. + /// /// The property names. /// The properties, or if any property is not found. new IReadOnlyList? FindProperties(IReadOnlyList propertyNames) @@ -767,14 +739,12 @@ IMutableIndex AddIndex(IMutableProperty property, string name) => (IMutableProperty?)((IReadOnlyEntityType)this).FindDeclaredProperty(name); /// - /// - /// Gets a property with the given name. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find a navigation property. - /// + /// Gets a property with the given name. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The property name. /// The property, or if none is found. new IMutableProperty GetProperty(string name) @@ -824,43 +794,37 @@ IMutableProperty AddIndexerProperty( } /// - /// - /// Gets all non-navigation properties declared on this entity type. - /// - /// - /// This method does not return properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same property more than once. - /// Use to also return properties declared on base types. - /// + /// Gets all non-navigation properties declared on this entity type. /// + /// + /// This method does not return properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same property more than once. + /// Use to also return properties declared on base types. + /// /// Declared non-navigation properties. new IEnumerable GetDeclaredProperties() => ((IReadOnlyEntityType)this).GetDeclaredProperties().Cast(); /// - /// - /// Gets all non-navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return properties declared on the given entity type itself. - /// Use to return properties declared on this - /// and base entity typed types. - /// + /// Gets all non-navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return properties declared on the given entity type itself. + /// Use to return properties declared on this + /// and base entity typed types. + /// /// Derived non-navigation properties. new IEnumerable GetDerivedProperties() => ((IReadOnlyEntityType)this).GetDerivedProperties().Cast(); /// - /// - /// Gets the properties defined on this entity type. - /// - /// - /// This API only returns scalar properties and does not return navigation properties. Use - /// to get navigation - /// properties. - /// + /// Gets the properties defined on this entity type. /// + /// + /// This API only returns scalar properties and does not return navigation properties. Use + /// to get navigation + /// properties. + /// /// The properties defined on this entity type. new IEnumerable GetProperties(); @@ -886,54 +850,46 @@ IMutableProperty AddIndexerProperty( IMutableServiceProperty AddServiceProperty(MemberInfo memberInfo); /// - /// - /// Gets the service property with a given name. - /// Returns if no property with the given name is defined. - /// - /// - /// This API only finds service properties and does not find scalar or navigation properties. - /// + /// Gets the service property with a given name. + /// Returns if no property with the given name is defined. /// + /// + /// This API only finds service properties and does not find scalar or navigation properties. + /// /// The name of the service property. /// The service property, or if none is found. new IMutableServiceProperty? FindServiceProperty(string name); /// - /// - /// Gets all service properties declared on this entity type. - /// - /// - /// This method does not return properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same property more than once. - /// Use to also return properties declared on base types. - /// + /// Gets all service properties declared on this entity type. /// + /// + /// This method does not return properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same property more than once. + /// Use to also return properties declared on base types. + /// /// Declared service properties. new IEnumerable GetDeclaredServiceProperties() => ((IReadOnlyEntityType)this).GetDeclaredServiceProperties().Cast(); /// - /// - /// Gets all service properties declared on the types derived from this entity type. - /// - /// - /// This method does not return service properties declared on the given entity type itself. - /// Use to return service properties declared on this - /// and base entity typed types. - /// + /// Gets all service properties declared on the types derived from this entity type. /// + /// + /// This method does not return service properties declared on the given entity type itself. + /// Use to return service properties declared on this + /// and base entity typed types. + /// /// Derived service properties. new IEnumerable GetDerivedServiceProperties() => ((IReadOnlyEntityType)this).GetDerivedServiceProperties().Cast(); /// - /// - /// Gets all the service properties defined on this entity type. - /// - /// - /// This API only returns service properties and does not return scalar or navigation properties. - /// + /// Gets all the service properties defined on this entity type. /// + /// + /// This API only returns service properties and does not return scalar or navigation properties. + /// /// The service properties defined on this entity type. new IEnumerable GetServiceProperties(); diff --git a/src/EFCore/Metadata/IMutableForeignKey.cs b/src/EFCore/Metadata/IMutableForeignKey.cs index 8e644eb87d2..7bab70e86a5 100644 --- a/src/EFCore/Metadata/IMutableForeignKey.cs +++ b/src/EFCore/Metadata/IMutableForeignKey.cs @@ -9,17 +9,17 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a relationship where a foreign key property(s) in a dependent entity type - /// reference a corresponding primary or alternate key in a principal entity type. - /// + /// Represents a relationship where a foreign key property(s) in a dependent entity type + /// reference a corresponding primary or alternate key in a principal entity type. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IMutableForeignKey : IReadOnlyForeignKey, IMutableAnnotatable { diff --git a/src/EFCore/Metadata/IMutableIndex.cs b/src/EFCore/Metadata/IMutableIndex.cs index 75e6ee16c2e..373bccc7209 100644 --- a/src/EFCore/Metadata/IMutableIndex.cs +++ b/src/EFCore/Metadata/IMutableIndex.cs @@ -6,16 +6,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents an index on a set of properties. - /// + /// Represents an index on a set of properties. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IMutableIndex : IReadOnlyIndex, IMutableAnnotatable { diff --git a/src/EFCore/Metadata/IMutableKey.cs b/src/EFCore/Metadata/IMutableKey.cs index aa634fb0127..5542f87770d 100644 --- a/src/EFCore/Metadata/IMutableKey.cs +++ b/src/EFCore/Metadata/IMutableKey.cs @@ -7,16 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a primary or alternate key on an entity. - /// + /// Represents a primary or alternate key on an entity. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IMutableKey : IReadOnlyKey, IMutableAnnotatable { diff --git a/src/EFCore/Metadata/IMutableModel.cs b/src/EFCore/Metadata/IMutableModel.cs index 44a740492fa..76cbc2da14a 100644 --- a/src/EFCore/Metadata/IMutableModel.cs +++ b/src/EFCore/Metadata/IMutableModel.cs @@ -9,45 +9,41 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Metadata about the shape of entities, the relationships between them, and how they map to - /// the database. A model is typically created by overriding the - /// method on a derived - /// . - /// + /// Metadata about the shape of entities, the relationships between them, and how they map to + /// the database. A model is typically created by overriding the + /// method on a derived + /// . + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IMutableModel : IReadOnlyModel, IMutableAnnotatable { /// - /// - /// Prevents conventions from being executed immediately when a metadata aspect is modified. All the delayed conventions - /// will be executed after the returned object is disposed. - /// - /// - /// This is useful when performing multiple operations that depend on each other. - /// + /// Prevents conventions from being executed immediately when a metadata aspect is modified. All the delayed conventions + /// will be executed after the returned object is disposed. /// + /// + /// This is useful when performing multiple operations that depend on each other. + /// /// An object that should be disposed to execute the delayed conventions. IConventionBatch DelayConventions(); /// - /// - /// Sets the to use for properties of all entity types - /// in this model. - /// - /// - /// Note that individual entity types can override this access mode, and individual properties of - /// entity types can override the access mode set on the entity type. The value set here will - /// be used for any property for which no override has been specified. - /// + /// Sets the to use for properties of all entity types + /// in this model. /// + /// + /// Note that individual entity types can override this access mode, and individual properties of + /// entity types can override the access mode set on the entity type. The value set here will + /// be used for any property for which no override has been specified. + /// /// The , or to clear the mode set. void SetPropertyAccessMode(PropertyAccessMode? propertyAccessMode); @@ -59,14 +55,12 @@ public interface IMutableModel : IReadOnlyModel, IMutableAnnotatable void SetChangeTrackingStrategy(ChangeTrackingStrategy? changeTrackingStrategy); /// - /// - /// Adds an entity type of default type to the model. - /// - /// - /// Shadow entities are not currently supported in a model that is used at runtime with a . - /// Therefore, shadow state entity types will only exist in migration model snapshots, etc. - /// + /// Adds an entity type of default type to the model. /// + /// + /// Shadow entities are not currently supported in a model that is used at runtime with a . + /// Therefore, shadow state entity types will only exist in migration model snapshots, etc. + /// /// The name of the entity to be added. /// The new entity type. IMutableEntityType AddEntityType(string name); @@ -79,14 +73,12 @@ public interface IMutableModel : IReadOnlyModel, IMutableAnnotatable IMutableEntityType AddEntityType(Type type); /// - /// - /// Adds a shared type entity type to the model. - /// - /// - /// Shared type entity type is an entity type which can share CLR type with other types in the model but has - /// a unique name and always identified by the name. - /// + /// Adds a shared type entity type to the model. /// + /// + /// Shared type entity type is an entity type which can share CLR type with other types in the model but has + /// a unique name and always identified by the name. + /// /// The name of the entity to be added. /// The CLR class that is used to represent instances of the entity type. /// The new entity type. @@ -117,14 +109,12 @@ IMutableEntityType AddEntityType( IMutableEntityType definingEntityType); /// - /// - /// Adds an owned entity type of default type to the model. - /// - /// - /// Shadow entities are not currently supported in a model that is used at runtime with a . - /// Therefore, shadow state entity types will only exist in migration model snapshots, etc. - /// + /// Adds an owned entity type of default type to the model. /// + /// + /// Shadow entities are not currently supported in a model that is used at runtime with a . + /// Therefore, shadow state entity types will only exist in migration model snapshots, etc. + /// /// The name of the entity to be added. /// The new entity type. IMutableEntityType AddOwnedEntityType(string name); @@ -137,14 +127,12 @@ IMutableEntityType AddEntityType( IMutableEntityType AddOwnedEntityType(Type type); /// - /// - /// Adds an owned shared type entity type to the model. - /// - /// - /// Shared type entity type is an entity type which can share CLR type with other types in the model but has - /// a unique name and always identified by the name. - /// + /// Adds an owned shared type entity type to the model. /// + /// + /// Shared type entity type is an entity type which can share CLR type with other types in the model but has + /// a unique name and always identified by the name. + /// /// The name of the entity to be added. /// The CLR class that is used to represent instances of the entity type. /// The new entity type. diff --git a/src/EFCore/Metadata/IMutableNavigation.cs b/src/EFCore/Metadata/IMutableNavigation.cs index f699ac91859..c44ee97505d 100644 --- a/src/EFCore/Metadata/IMutableNavigation.cs +++ b/src/EFCore/Metadata/IMutableNavigation.cs @@ -7,16 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a navigation property which can be used to navigate a relationship. - /// + /// Represents a navigation property which can be used to navigate a relationship. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IMutableNavigation : IReadOnlyNavigation, IMutableNavigationBase { diff --git a/src/EFCore/Metadata/IMutableNavigationBase.cs b/src/EFCore/Metadata/IMutableNavigationBase.cs index 8d32fe75e4b..9ca16690811 100644 --- a/src/EFCore/Metadata/IMutableNavigationBase.cs +++ b/src/EFCore/Metadata/IMutableNavigationBase.cs @@ -6,16 +6,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a navigation property which can be used to navigate a relationship. - /// + /// Represents a navigation property which can be used to navigate a relationship. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IMutableNavigationBase : IReadOnlyNavigationBase, IMutablePropertyBase { diff --git a/src/EFCore/Metadata/IMutableProperty.cs b/src/EFCore/Metadata/IMutableProperty.cs index 0569eaeebcf..9ae309132fa 100644 --- a/src/EFCore/Metadata/IMutableProperty.cs +++ b/src/EFCore/Metadata/IMutableProperty.cs @@ -12,16 +12,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a scalar property of an entity type. - /// + /// Represents a scalar property of an entity type. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IMutableProperty : IReadOnlyProperty, IMutablePropertyBase { @@ -139,10 +139,10 @@ public interface IMutableProperty : IReadOnlyProperty, IMutablePropertyBase void SetIsUnicode(bool? unicode); /// - /// - /// Gets or sets a value indicating whether this property can be modified before the entity is - /// saved to the database. - /// + /// Gets or sets a value indicating whether this property can be modified before the entity is + /// saved to the database. + /// + /// /// /// If , then an exception /// will be thrown if a value is assigned to this property when it is in @@ -152,17 +152,17 @@ public interface IMutableProperty : IReadOnlyProperty, IMutablePropertyBase /// If , then any value /// set will be ignored when it is in the state. /// - /// + /// /// /// A value indicating whether this property can be modified before the entity is saved to the database. /// void SetBeforeSaveBehavior(PropertySaveBehavior? beforeSaveBehavior); /// - /// - /// Gets or sets a value indicating whether this property can be modified after the entity is - /// saved to the database. - /// + /// Gets or sets a value indicating whether this property can be modified after the entity is + /// saved to the database. + /// + /// /// /// If , then an exception /// will be thrown if a new value is assigned to this property after the entity exists in the database. @@ -171,21 +171,19 @@ public interface IMutableProperty : IReadOnlyProperty, IMutablePropertyBase /// If , then any modification to the /// property value of an entity that already exists in the database will be ignored. /// - /// + /// /// /// A value indicating whether this property can be modified after the entity is saved to the database. /// void SetAfterSaveBehavior(PropertySaveBehavior? afterSaveBehavior); /// - /// - /// Sets the factory to use for generating values for this property, or to clear any previously set factory. - /// - /// - /// Setting does not disable value generation for this property, it just clears any generator explicitly - /// configured for this property. The database provider may still have a value generator for the property type. - /// + /// Sets the factory to use for generating values for this property, or to clear any previously set factory. /// + /// + /// Setting does not disable value generation for this property, it just clears any generator explicitly + /// configured for this property. The database provider may still have a value generator for the property type. + /// /// /// A factory that will be used to create the value generator, or to /// clear any previously set factory. @@ -193,14 +191,12 @@ public interface IMutableProperty : IReadOnlyProperty, IMutablePropertyBase void SetValueGeneratorFactory(Func? valueGeneratorFactory); /// - /// - /// Sets the factory to use for generating values for this property, or to clear any previously set factory. - /// - /// - /// Setting does not disable value generation for this property, it just clears any generator explicitly - /// configured for this property. The database provider may still have a value generator for the property type. - /// + /// Sets the factory to use for generating values for this property, or to clear any previously set factory. /// + /// + /// Setting does not disable value generation for this property, it just clears any generator explicitly + /// configured for this property. The database provider may still have a value generator for the property type. + /// /// /// A factory that will be used to create the value generator, or to /// clear any previously set factory. diff --git a/src/EFCore/Metadata/IMutablePropertyBase.cs b/src/EFCore/Metadata/IMutablePropertyBase.cs index 8cdec1277ee..356c46dca50 100644 --- a/src/EFCore/Metadata/IMutablePropertyBase.cs +++ b/src/EFCore/Metadata/IMutablePropertyBase.cs @@ -6,16 +6,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Base type for navigation and scalar properties. - /// + /// Base type for navigation and scalar properties. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IMutablePropertyBase : IReadOnlyPropertyBase, IMutableAnnotatable { @@ -31,9 +31,9 @@ public interface IMutablePropertyBase : IReadOnlyPropertyBase, IMutableAnnotatab new FieldInfo? FieldInfo { get; set; } /// - /// - /// Sets the underlying CLR field that this property should use. - /// + /// Sets the underlying CLR field that this property should use. + /// + /// /// /// Backing fields are normally found by convention as described /// here: http://go.microsoft.com/fwlink/?LinkId=723277. @@ -46,7 +46,7 @@ public interface IMutablePropertyBase : IReadOnlyPropertyBase, IMutableAnnotatab /// Properties are used for all other accesses. This can be changed by calling /// . /// - /// + /// /// The name of the field to use. void SetField(string? fieldName); diff --git a/src/EFCore/Metadata/IMutableServiceProperty.cs b/src/EFCore/Metadata/IMutableServiceProperty.cs index f929fd971bf..a488a912e39 100644 --- a/src/EFCore/Metadata/IMutableServiceProperty.cs +++ b/src/EFCore/Metadata/IMutableServiceProperty.cs @@ -4,17 +4,17 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// A in the Entity Framework model that represents an - /// injected service from the . - /// + /// A in the Entity Framework model that represents an + /// injected service from the . + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IMutableServiceProperty : IReadOnlyServiceProperty, IMutablePropertyBase { diff --git a/src/EFCore/Metadata/IMutableSkipNavigation.cs b/src/EFCore/Metadata/IMutableSkipNavigation.cs index 74bcb15626f..29279db523b 100644 --- a/src/EFCore/Metadata/IMutableSkipNavigation.cs +++ b/src/EFCore/Metadata/IMutableSkipNavigation.cs @@ -6,17 +6,17 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a navigation property that is part of a relationship - /// that is forwarded through a third entity type. - /// + /// Represents a navigation property that is part of a relationship + /// that is forwarded through a third entity type. + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IMutableSkipNavigation : IReadOnlySkipNavigation, IMutableNavigationBase { diff --git a/src/EFCore/Metadata/IMutableTypeBase.cs b/src/EFCore/Metadata/IMutableTypeBase.cs index 04fe5447b83..e0c0f3111d6 100644 --- a/src/EFCore/Metadata/IMutableTypeBase.cs +++ b/src/EFCore/Metadata/IMutableTypeBase.cs @@ -7,16 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Represents a type in an . - /// + /// Represents a type in an . + /// + /// /// /// This interface is used during model creation and allows the metadata to be modified. /// Once the model is built, represents a read-only view of the same metadata. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// public interface IMutableTypeBase : IReadOnlyTypeBase, IMutableAnnotatable { @@ -54,27 +54,23 @@ public interface IMutableTypeBase : IReadOnlyTypeBase, IMutableAnnotatable IEnumerable GetIgnoredMembers(); /// - /// - /// Sets the to use for properties and navigations of this entity type. - /// - /// - /// Note that individual properties and navigations can override this access mode. The value set here will - /// be used for any property or navigation for which no override has been specified. - /// + /// Sets the to use for properties and navigations of this entity type. /// + /// + /// Note that individual properties and navigations can override this access mode. The value set here will + /// be used for any property or navigation for which no override has been specified. + /// /// The , or to clear the mode set. void SetPropertyAccessMode(PropertyAccessMode? propertyAccessMode) => SetOrRemoveAnnotation(CoreAnnotationNames.PropertyAccessMode, propertyAccessMode); /// - /// - /// Sets the to use for navigations of this entity type. - /// - /// - /// Note that individual navigations can override this access mode. The value set here will - /// be used for any navigation for which no override has been specified. - /// + /// Sets the to use for navigations of this entity type. /// + /// + /// Note that individual navigations can override this access mode. The value set here will + /// be used for any navigation for which no override has been specified. + /// /// The , or to clear the mode set. void SetNavigationAccessMode(PropertyAccessMode? propertyAccessMode) => SetOrRemoveAnnotation(CoreAnnotationNames.NavigationAccessMode, propertyAccessMode); diff --git a/src/EFCore/Metadata/IParameterBindingFactories.cs b/src/EFCore/Metadata/IParameterBindingFactories.cs index 884c7114808..bf7cc813c16 100644 --- a/src/EFCore/Metadata/IParameterBindingFactories.cs +++ b/src/EFCore/Metadata/IParameterBindingFactories.cs @@ -7,18 +7,18 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Allows a to be found from those registered in the - /// internal service provider. - /// + /// Allows a to be found from those registered in the + /// internal service provider. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Entity types with constructors for more information. + /// + /// See Entity types with constructors for more information. + /// /// public interface IParameterBindingFactories { diff --git a/src/EFCore/Metadata/IParameterBindingFactory.cs b/src/EFCore/Metadata/IParameterBindingFactory.cs index 439a23997a6..e453d659521 100644 --- a/src/EFCore/Metadata/IParameterBindingFactory.cs +++ b/src/EFCore/Metadata/IParameterBindingFactory.cs @@ -7,18 +7,18 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Factory for finding and creating instances. - /// + /// Factory for finding and creating instances. + /// + /// /// /// The service lifetime is and multiple registrations /// are allowed. This means a single instance of each service is used by many /// instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Entity types with constructors for more information. + /// + /// See Entity types with constructors for more information. + /// /// public interface IParameterBindingFactory { diff --git a/src/EFCore/Metadata/IPropertyBase.cs b/src/EFCore/Metadata/IPropertyBase.cs index 97bc3281ead..4540d322a6b 100644 --- a/src/EFCore/Metadata/IPropertyBase.cs +++ b/src/EFCore/Metadata/IPropertyBase.cs @@ -29,35 +29,29 @@ public interface IPropertyBase : IReadOnlyPropertyBase, IAnnotatable } /// - /// - /// Gets a for reading the value of this property. - /// - /// - /// Note that it is an error to call this method for a shadow property () - /// since such a property has no associated . - /// + /// Gets a for reading the value of this property. /// + /// + /// Note that it is an error to call this method for a shadow property () + /// since such a property has no associated . + /// /// The accessor. IClrPropertyGetter GetGetter(); /// - /// - /// Gets a for comparing values in tracked entries. - /// + /// Gets a for comparing values in tracked entries. /// /// The comparer. IComparer GetCurrentValueComparer(); /// - /// - /// Gets the or that should be used to - /// get or set a value for the given property. - /// - /// - /// Note that it is an error to call this method for a shadow property () - /// since such a property has no associated . - /// + /// Gets the or that should be used to + /// get or set a value for the given property. /// + /// + /// Note that it is an error to call this method for a shadow property () + /// since such a property has no associated . + /// /// /// If , then the member to use for query materialization will be returned. /// diff --git a/src/EFCore/Metadata/IPropertyParameterBindingFactory.cs b/src/EFCore/Metadata/IPropertyParameterBindingFactory.cs index 0ba619db829..e7fcccb3927 100644 --- a/src/EFCore/Metadata/IPropertyParameterBindingFactory.cs +++ b/src/EFCore/Metadata/IPropertyParameterBindingFactory.cs @@ -7,18 +7,18 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Finds a specifically for some form of property - /// (that is, some ) of the model. - /// + /// Finds a specifically for some form of property + /// (that is, some ) of the model. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Entity types with constructors for more information. + /// + /// See Entity types with constructors for more information. + /// /// public interface IPropertyParameterBindingFactory { diff --git a/src/EFCore/Metadata/IReadOnlyEntityType.cs b/src/EFCore/Metadata/IReadOnlyEntityType.cs index 9ac725b545c..91c6bb11139 100644 --- a/src/EFCore/Metadata/IReadOnlyEntityType.cs +++ b/src/EFCore/Metadata/IReadOnlyEntityType.cs @@ -285,15 +285,13 @@ bool IsStrictlyDerivedFrom(IReadOnlyEntityType baseType) IEnumerable GetKeys(); /// - /// - /// Gets all keys declared on this entity type. - /// - /// - /// This method does not return keys declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same key more than once. - /// Use to also return keys declared on base types. - /// + /// Gets all keys declared on this entity type. /// + /// + /// This method does not return keys declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same key more than once. + /// Use to also return keys declared on base types. + /// /// Declared keys. IEnumerable GetDeclaredKeys(); @@ -357,28 +355,24 @@ IEnumerable FindForeignKeys(IReadOnlyProperty property) IEnumerable FindDeclaredForeignKeys(IReadOnlyList properties); /// - /// - /// Gets all foreign keys declared on this entity type.. - /// - /// - /// This method does not return foreign keys declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. - /// Use to also return foreign keys declared on base types. - /// + /// Gets all foreign keys declared on this entity type.. /// + /// + /// This method does not return foreign keys declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. + /// Use to also return foreign keys declared on base types. + /// /// Declared foreign keys. IEnumerable GetDeclaredForeignKeys(); /// - /// - /// Gets all foreign keys declared on the types derived from this entity type. - /// - /// - /// This method does not return foreign keys declared on the given entity type itself. - /// Use to return foreign keys declared on this - /// and base entity typed types. - /// + /// Gets all foreign keys declared on the types derived from this entity type. /// + /// + /// This method does not return foreign keys declared on the given entity type itself. + /// Use to return foreign keys declared on this + /// and base entity typed types. + /// /// Derived foreign keys. IEnumerable GetDerivedForeignKeys(); @@ -479,28 +473,24 @@ bool IsInOwnershipPath(IReadOnlyEntityType targetType) IReadOnlyNavigation? FindDeclaredNavigation(string name); /// - /// - /// Gets all navigation properties declared on this entity type. - /// - /// - /// This method does not return navigation properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same navigation property more than once. - /// Use to also return navigation properties declared on base types. - /// + /// Gets all navigation properties declared on this entity type. /// + /// + /// This method does not return navigation properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same navigation property more than once. + /// Use to also return navigation properties declared on base types. + /// /// Declared navigation properties. IEnumerable GetDeclaredNavigations(); /// - /// - /// Gets all navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return navigation properties declared on the given entity type itself. - /// Use to return navigation properties declared on this - /// and base entity typed types. - /// + /// Gets all navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return navigation properties declared on the given entity type itself. + /// Use to return navigation properties declared on this + /// and base entity typed types. + /// /// Derived navigation properties. IEnumerable GetDerivedNavigations(); @@ -526,14 +516,12 @@ bool IsInOwnershipPath(IReadOnlyEntityType targetType) IReadOnlySkipNavigation? FindSkipNavigation(string name); /// - /// - /// Gets a skip navigation property on this entity type. - /// - /// - /// Does not return skip navigation properties defined on a base type. - /// Returns if no skip navigation property is found. - /// + /// Gets a skip navigation property on this entity type. /// + /// + /// Does not return skip navigation properties defined on a base type. + /// Returns if no skip navigation property is found. + /// /// The name of the navigation property on the entity class. /// The navigation property, or if none is found. IReadOnlySkipNavigation? FindDeclaredSkipNavigation(string name) @@ -543,28 +531,24 @@ bool IsInOwnershipPath(IReadOnlyEntityType targetType) } /// - /// - /// Gets all skip navigation properties declared on this entity type. - /// - /// - /// This method does not return skip navigation properties declared declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. - /// Use to also return skip navigation properties declared on base types. - /// + /// Gets all skip navigation properties declared on this entity type. /// + /// + /// This method does not return skip navigation properties declared declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same foreign key more than once. + /// Use to also return skip navigation properties declared on base types. + /// /// Declared skip navigations. IEnumerable GetDeclaredSkipNavigations(); /// - /// - /// Gets all skip navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return skip navigation properties declared on the given entity type itself. - /// Use to return skip navigation properties declared on this - /// and base entity typed types. - /// + /// Gets all skip navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return skip navigation properties declared on the given entity type itself. + /// Use to return skip navigation properties declared on this + /// and base entity typed types. + /// /// Derived skip navigation properties. IEnumerable GetDerivedSkipNavigations(); @@ -575,13 +559,11 @@ bool IsInOwnershipPath(IReadOnlyEntityType targetType) IEnumerable GetSkipNavigations(); /// - /// - /// Gets the unnamed index defined on the given properties. Returns if no such index is defined. - /// - /// - /// Named indexes will not be returned even if the list of properties matches. - /// + /// Gets the unnamed index defined on the given properties. Returns if no such index is defined. /// + /// + /// Named indexes will not be returned even if the list of properties matches. + /// /// The properties to find the index on. /// The index, or if none is found. IReadOnlyIndex? FindIndex(IReadOnlyList properties); @@ -594,35 +576,29 @@ bool IsInOwnershipPath(IReadOnlyEntityType targetType) IReadOnlyIndex? FindIndex(string name); /// - /// - /// Gets the unnamed index defined on the given property. Returns if no such index is defined. - /// - /// - /// Named indexes will not be returned even if the list of properties matches. - /// + /// Gets the unnamed index defined on the given property. Returns if no such index is defined. /// + /// + /// Named indexes will not be returned even if the list of properties matches. + /// /// The property to find the index on. /// The index, or if none is found. IReadOnlyIndex? FindIndex(IReadOnlyProperty property) => FindIndex(new[] { property }); /// - /// - /// Gets all indexes declared on this entity type. - /// - /// - /// This method does not return indexes declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same index more than once. - /// Use to also return indexes declared on base types. - /// + /// Gets all indexes declared on this entity type. /// + /// + /// This method does not return indexes declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same index more than once. + /// Use to also return indexes declared on base types. + /// /// Declared indexes. IEnumerable GetDeclaredIndexes(); /// - /// - /// Gets all indexes declared on the types derived from this entity type. - /// + /// Gets all indexes declared on the types derived from this entity type. /// /// Derived indexes. IEnumerable GetDerivedIndexes(); @@ -634,27 +610,23 @@ bool IsInOwnershipPath(IReadOnlyEntityType targetType) IEnumerable GetIndexes(); /// - /// - /// Gets the property with a given name. Returns if no property with the given name is defined. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find a navigation property. - /// + /// Gets the property with a given name. Returns if no property with the given name is defined. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The name of the property. /// The property, or if none is found. IReadOnlyProperty? FindProperty(string name); /// - /// - /// Gets a property with the given member info. Returns if no property is found. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find a navigation property. - /// + /// Gets a property with the given member info. Returns if no property is found. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The member on the entity class. /// The property, or if none is found. IReadOnlyProperty? FindProperty(MemberInfo memberInfo) @@ -663,13 +635,11 @@ bool IsInOwnershipPath(IReadOnlyEntityType targetType) : FindProperty(memberInfo.GetSimpleMemberName()); /// - /// - /// Finds matching properties on the given entity type. Returns if any property is not found. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. - /// + /// Finds matching properties on the given entity type. Returns if any property is not found. /// + /// + /// This API only finds scalar properties and does not find navigation properties. + /// /// The property names. /// The properties, or if any property is not found. IReadOnlyList? FindProperties(IReadOnlyList propertyNames); @@ -683,14 +653,12 @@ bool IsInOwnershipPath(IReadOnlyEntityType targetType) IReadOnlyProperty? FindDeclaredProperty(string name); /// - /// - /// Gets a property with the given name. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find a navigation property. - /// + /// Gets a property with the given name. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The property name. /// The property, or if none is found. IReadOnlyProperty GetProperty(string name) @@ -716,90 +684,76 @@ IReadOnlyProperty GetProperty(string name) } /// - /// - /// Gets all non-navigation properties declared on this entity type. - /// - /// - /// This method does not return properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same property more than once. - /// Use to also return properties declared on base types. - /// + /// Gets all non-navigation properties declared on this entity type. /// + /// + /// This method does not return properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same property more than once. + /// Use to also return properties declared on base types. + /// /// Declared non-navigation properties. IEnumerable GetDeclaredProperties(); /// - /// - /// Gets all non-navigation properties declared on the types derived from this entity type. - /// - /// - /// This method does not return properties declared on the given entity type itself. - /// Use to return properties declared on this - /// and base entity typed types. - /// + /// Gets all non-navigation properties declared on the types derived from this entity type. /// + /// + /// This method does not return properties declared on the given entity type itself. + /// Use to return properties declared on this + /// and base entity typed types. + /// /// Derived non-navigation properties. IEnumerable GetDerivedProperties(); /// - /// - /// Gets the properties defined on this entity type. - /// - /// - /// This API only returns scalar properties and does not return navigation properties. Use - /// to get navigation properties. - /// + /// Gets the properties defined on this entity type. /// + /// + /// This API only returns scalar properties and does not return navigation properties. Use + /// to get navigation properties. + /// /// The properties defined on this entity type. IEnumerable GetProperties(); /// - /// - /// Gets the service property with a given name. - /// Returns if no property with the given name is defined. - /// - /// - /// This API only finds service properties and does not find scalar or navigation properties. - /// + /// Gets the service property with a given name. + /// Returns if no property with the given name is defined. /// + /// + /// This API only finds service properties and does not find scalar or navigation properties. + /// /// The name of the service property. /// The service property, or if none is found. IReadOnlyServiceProperty? FindServiceProperty(string name); /// - /// - /// Gets all service properties declared on this entity type. - /// - /// - /// This method does not return properties declared on base types. - /// It is useful when iterating over all entity types to avoid processing the same property more than once. - /// Use to also return properties declared on base types. - /// + /// Gets all service properties declared on this entity type. /// + /// + /// This method does not return properties declared on base types. + /// It is useful when iterating over all entity types to avoid processing the same property more than once. + /// Use to also return properties declared on base types. + /// /// Declared service properties. IEnumerable GetDeclaredServiceProperties(); /// - /// - /// Gets all service properties declared on the types derived from this entity type. - /// - /// - /// This method does not return service properties declared on the given entity type itself. - /// Use to return service properties declared on this - /// and base entity typed types. - /// + /// Gets all service properties declared on the types derived from this entity type. /// + /// + /// This method does not return service properties declared on the given entity type itself. + /// Use to return service properties declared on this + /// and base entity typed types. + /// /// Derived service properties. IEnumerable GetDerivedServiceProperties(); /// - /// - /// Gets all the defined on this entity type. - /// - /// - /// This API only returns service properties and does not return scalar or navigation properties. - /// + /// Gets all the defined on this entity type. /// + /// + /// This API only returns service properties and does not return scalar or navigation properties. + /// /// The service properties defined on this entity type. IEnumerable GetServiceProperties(); diff --git a/src/EFCore/Metadata/IReadOnlyModel.cs b/src/EFCore/Metadata/IReadOnlyModel.cs index 4816a841cf4..fb9c5fc8aad 100644 --- a/src/EFCore/Metadata/IReadOnlyModel.cs +++ b/src/EFCore/Metadata/IReadOnlyModel.cs @@ -32,17 +32,17 @@ public interface IReadOnlyModel : IReadOnlyAnnotatable ChangeTrackingStrategy GetChangeTrackingStrategy(); /// - /// - /// Gets the being used for properties of entity types in this model. - /// + /// Gets the being used for properties of entity types in this model. + /// + /// /// /// Note that individual entity types can override this access mode, and individual properties of /// entity types can override the access mode set on the entity type. The value returned here will /// be used for any property for which no override has been specified. /// - /// - /// - /// See Modeling entity types and relationships for more information. + /// + /// See Modeling entity types and relationships for more information. + /// /// /// The access mode being used. [DebuggerStepThrough] diff --git a/src/EFCore/Metadata/IReadOnlyProperty.cs b/src/EFCore/Metadata/IReadOnlyProperty.cs index ffc1d560884..bbd2915193a 100644 --- a/src/EFCore/Metadata/IReadOnlyProperty.cs +++ b/src/EFCore/Metadata/IReadOnlyProperty.cs @@ -100,10 +100,10 @@ CoreTypeMapping GetTypeMapping() bool? IsUnicode(); /// - /// - /// Gets a value indicating whether or not this property can be modified before the entity is - /// saved to the database. - /// + /// Gets a value indicating whether or not this property can be modified before the entity is + /// saved to the database. + /// + /// /// /// If , then an exception /// will be thrown if a value is assigned to this property when it is in @@ -113,15 +113,15 @@ CoreTypeMapping GetTypeMapping() /// If , then any value /// set will be ignored when it is in the state. /// - /// + /// /// The before save behavior for this property. PropertySaveBehavior GetBeforeSaveBehavior(); /// - /// - /// Gets a value indicating whether or not this property can be modified after the entity is - /// saved to the database. - /// + /// Gets a value indicating whether or not this property can be modified after the entity is + /// saved to the database. + /// + /// /// /// If , then an exception /// will be thrown if a new value is assigned to this property after the entity exists in the database. @@ -130,7 +130,7 @@ CoreTypeMapping GetTypeMapping() /// If , then any modification to the /// property value of an entity that already exists in the database will be ignored. /// - /// + /// /// The after save behavior for this property. PropertySaveBehavior GetAfterSaveBehavior(); diff --git a/src/EFCore/Metadata/IReadOnlyTypeBase.cs b/src/EFCore/Metadata/IReadOnlyTypeBase.cs index b81d3233a95..64af51179ea 100644 --- a/src/EFCore/Metadata/IReadOnlyTypeBase.cs +++ b/src/EFCore/Metadata/IReadOnlyTypeBase.cs @@ -27,15 +27,13 @@ public interface IReadOnlyTypeBase : IReadOnlyAnnotatable string Name { get; } /// - /// /// Gets the CLR class that is used to represent instances of this type. /// Returns if the type does not have a corresponding CLR class (known as a shadow type). - /// - /// + /// + /// /// Shadow types are not currently supported in a model that is used at runtime with a . /// Therefore, shadow types will only exist in migration model snapshots, etc. - /// - /// + /// Type ClrType { get; } /// @@ -143,26 +141,22 @@ string ShortName() } /// - /// /// Gets the being used for properties and navigations of this type. - /// - /// + /// + /// /// Note that individual properties and navigations can override this access mode. The value returned here will /// be used for any property or navigation for which no override has been specified. - /// - /// + /// /// The access mode being used. PropertyAccessMode GetPropertyAccessMode(); /// - /// /// Gets the being used for navigations of this type. - /// - /// + /// + /// /// Note that individual navigations can override this access mode. The value returned here will /// be used for any navigation for which no override has been specified. - /// - /// + /// /// The access mode being used. PropertyAccessMode GetNavigationAccessMode(); diff --git a/src/EFCore/Metadata/Internal/ConstructorBindingFactory.cs b/src/EFCore/Metadata/Internal/ConstructorBindingFactory.cs index c306fd3f951..5cb6da52e47 100644 --- a/src/EFCore/Metadata/Internal/ConstructorBindingFactory.cs +++ b/src/EFCore/Metadata/Internal/ConstructorBindingFactory.cs @@ -13,18 +13,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class ConstructorBindingFactory : IConstructorBindingFactory { private readonly IPropertyParameterBindingFactory _propertyFactory; @@ -165,9 +163,10 @@ private void GetBindings( var constructorErrors = bindingFailures.SelectMany(f => f) .GroupBy(f => (ConstructorInfo)f.Member) .Select( - x => " " + CoreStrings.ConstructorBindingFailed( - string.Join("', '", x.Select(f => f.Name)), - $"{entityType.DisplayName()}({string.Join(", ", ConstructConstructor(x))})") + x => " " + + CoreStrings.ConstructorBindingFailed( + string.Join("', '", x.Select(f => f.Name)), + $"{entityType.DisplayName()}({string.Join(", ", ConstructConstructor(x))})") ); IEnumerable ConstructConstructor(IGrouping parameters) diff --git a/src/EFCore/Metadata/Internal/EntityTypeParameterBindingFactory.cs b/src/EFCore/Metadata/Internal/EntityTypeParameterBindingFactory.cs index 358f2d4929f..b0c6c7ee50c 100644 --- a/src/EFCore/Metadata/Internal/EntityTypeParameterBindingFactory.cs +++ b/src/EFCore/Metadata/Internal/EntityTypeParameterBindingFactory.cs @@ -8,19 +8,17 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is and multiple registrations - /// are allowed. This means a single instance of each service is used by many - /// instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is and multiple registrations + /// are allowed. This means a single instance of each service is used by many + /// instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class EntityTypeParameterBindingFactory : IParameterBindingFactory { /// diff --git a/src/EFCore/Metadata/Internal/IMemberClassifier.cs b/src/EFCore/Metadata/Internal/IMemberClassifier.cs index fa3e2d80abc..3e708a6936d 100644 --- a/src/EFCore/Metadata/Internal/IMemberClassifier.cs +++ b/src/EFCore/Metadata/Internal/IMemberClassifier.cs @@ -10,18 +10,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface IMemberClassifier { /// diff --git a/src/EFCore/Metadata/Internal/MemberClassifier.cs b/src/EFCore/Metadata/Internal/MemberClassifier.cs index c10a0370a86..02eccadbef7 100644 --- a/src/EFCore/Metadata/Internal/MemberClassifier.cs +++ b/src/EFCore/Metadata/Internal/MemberClassifier.cs @@ -15,18 +15,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class MemberClassifier : IMemberClassifier { private readonly ITypeMappingSource _typeMappingSource; diff --git a/src/EFCore/Metadata/Internal/Model.cs b/src/EFCore/Metadata/Internal/Model.cs index b25074b6638..db1b69e5edd 100644 --- a/src/EFCore/Metadata/Internal/Model.cs +++ b/src/EFCore/Metadata/Internal/Model.cs @@ -20,19 +20,17 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class Model : ConventionAnnotatable, IMutableModel, IConventionModel, IRuntimeModel { /// @@ -52,7 +50,9 @@ public class Model : ConventionAnnotatable, IMutableModel, IConventionModel, IRu private readonly Dictionary Types)> _sharedTypes = new() { - { DefaultPropertyBagType, (ConfigurationSource.Explicit, new SortedSet(EntityTypeFullNameComparer.Instance)) } + { + DefaultPropertyBagType, (ConfigurationSource.Explicit, new SortedSet(EntityTypeFullNameComparer.Instance)) + } }; private ConventionDispatcher? _conventionDispatcher; diff --git a/src/EFCore/Metadata/Internal/ParameterBindingFactories.cs b/src/EFCore/Metadata/Internal/ParameterBindingFactories.cs index a527ea907cd..c6f3d92e006 100644 --- a/src/EFCore/Metadata/Internal/ParameterBindingFactories.cs +++ b/src/EFCore/Metadata/Internal/ParameterBindingFactories.cs @@ -10,18 +10,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class ParameterBindingFactories : IParameterBindingFactories { private readonly IRegisteredServices _registeredServices; diff --git a/src/EFCore/Metadata/Internal/PropertyParameterBindingFactory.cs b/src/EFCore/Metadata/Internal/PropertyParameterBindingFactory.cs index ffed0ce6481..8c925f6462e 100644 --- a/src/EFCore/Metadata/Internal/PropertyParameterBindingFactory.cs +++ b/src/EFCore/Metadata/Internal/PropertyParameterBindingFactory.cs @@ -9,18 +9,16 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class PropertyParameterBindingFactory : IPropertyParameterBindingFactory { /// diff --git a/src/EFCore/Metadata/LazyLoaderParameterBindingFactory.cs b/src/EFCore/Metadata/LazyLoaderParameterBindingFactory.cs index f37f0d0c209..33d8aeb871a 100644 --- a/src/EFCore/Metadata/LazyLoaderParameterBindingFactory.cs +++ b/src/EFCore/Metadata/LazyLoaderParameterBindingFactory.cs @@ -13,18 +13,18 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// A for binding to the service. - /// + /// A for binding to the service. + /// + /// /// /// The service lifetime is and multiple registrations /// are allowed. This means a single instance of each service is used by many /// instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Entity types with constructors for more information. + /// + /// See Entity types with constructors for more information. + /// /// public class LazyLoaderParameterBindingFactory : ServiceParameterBindingFactory { diff --git a/src/EFCore/Metadata/LazyLoaderParameterBindingFactoryDependencies.cs b/src/EFCore/Metadata/LazyLoaderParameterBindingFactoryDependencies.cs index dad239ff0f1..23c47bb5154 100644 --- a/src/EFCore/Metadata/LazyLoaderParameterBindingFactoryDependencies.cs +++ b/src/EFCore/Metadata/LazyLoaderParameterBindingFactoryDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Metadata /// 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 @@ -28,28 +30,23 @@ namespace Microsoft.EntityFrameworkCore.Metadata /// instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record LazyLoaderParameterBindingFactoryDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public LazyLoaderParameterBindingFactoryDependencies() { diff --git a/src/EFCore/Metadata/RuntimeEntityType.cs b/src/EFCore/Metadata/RuntimeEntityType.cs index ca23409d7b9..b2447692fc1 100644 --- a/src/EFCore/Metadata/RuntimeEntityType.cs +++ b/src/EFCore/Metadata/RuntimeEntityType.cs @@ -266,8 +266,8 @@ public virtual RuntimeForeignKey AddForeignKey( if (principalEntityType.DeclaredReferencingForeignKeys == null) { - principalEntityType.DeclaredReferencingForeignKeys = new SortedSet(ForeignKeyComparer.Instance) - { foreignKey }; + principalEntityType.DeclaredReferencingForeignKeys = + new SortedSet(ForeignKeyComparer.Instance) { foreignKey }; } else { @@ -528,13 +528,11 @@ public virtual RuntimeIndex AddIndex( } /// - /// - /// Gets the unnamed index defined on the given properties. Returns if no such index is defined. - /// - /// - /// Named indexes will not be returned even if the list of properties matches. - /// + /// Gets the unnamed index defined on the given properties. Returns if no such index is defined. /// + /// + /// Named indexes will not be returned even if the list of properties matches. + /// /// The properties to find the index on. /// The index, or if none is found. public virtual RuntimeIndex? FindIndex(IReadOnlyList properties) @@ -650,14 +648,12 @@ public virtual RuntimeProperty AddProperty( } /// - /// - /// Gets the property with a given name. Returns if no property with the given name is defined. - /// - /// - /// This API only finds scalar properties and does not find navigation properties. Use - /// to find a navigation property. - /// + /// Gets the property with a given name. Returns if no property with the given name is defined. /// + /// + /// This API only finds scalar properties and does not find navigation properties. Use + /// to find a navigation property. + /// /// The name of the property. /// The property, or if none is found. public virtual RuntimeProperty? FindProperty(string name) @@ -677,13 +673,11 @@ private IEnumerable GetDerivedProperties() : GetDerivedTypes().SelectMany(et => et.GetDeclaredProperties()); /// - /// - /// Finds matching properties on the given entity type. Returns if any property is not found. - /// - /// - /// This API only finds scalar properties and does not find navigations or service properties. - /// + /// Finds matching properties on the given entity type. Returns if any property is not found. /// + /// + /// This API only finds scalar properties and does not find navigations or service properties. + /// /// The property names. /// The properties, or if any property is not found. public virtual IReadOnlyList? FindProperties(IEnumerable propertyNames) @@ -740,14 +734,12 @@ public virtual RuntimeServiceProperty AddServiceProperty( } /// - /// - /// Gets the service property with a given name. - /// Returns if no property with the given name is defined. - /// - /// - /// This API only finds service properties and does not find scalar or navigation properties. - /// + /// Gets the service property with a given name. + /// Returns if no property with the given name is defined. /// + /// + /// This API only finds service properties and does not find scalar or navigation properties. + /// /// The name of the service property. /// The service property, or if none is found. public virtual RuntimeServiceProperty? FindServiceProperty(string name) @@ -781,12 +773,12 @@ public virtual InstantiationBinding? ConstructorBinding get => !_clrType.IsAbstract ? NonCapturingLazyInitializer.EnsureInitialized( ref _constructorBinding, this, static entityType => - { - ((IModel)entityType.Model).GetModelDependencies().ConstructorBindingFactory.GetBindings( - entityType, - out entityType._constructorBinding, - out entityType._serviceOnlyConstructorBinding); - }) + { + ((IModel)entityType.Model).GetModelDependencies().ConstructorBindingFactory.GetBindings( + entityType, + out entityType._constructorBinding, + out entityType._serviceOnlyConstructorBinding); + }) : _constructorBinding; [DebuggerStepThrough] @@ -1296,28 +1288,28 @@ Func IRuntimeEntityType.InstanceFactory => NonCapturingLazyInitializer.EnsureInitialized( ref _instanceFactory, this, static entityType => + { + var binding = entityType._serviceOnlyConstructorBinding; + if (binding == null) { - var binding = entityType._serviceOnlyConstructorBinding; + var _ = ((IEntityType)entityType).ConstructorBinding; + binding = entityType._serviceOnlyConstructorBinding; if (binding == null) { - var _ = ((IEntityType)entityType).ConstructorBinding; - binding = entityType._serviceOnlyConstructorBinding; - if (binding == null) - { - throw new InvalidOperationException( - CoreStrings.NoParameterlessConstructor( - ((IReadOnlyEntityType)entityType).DisplayName())); - } + throw new InvalidOperationException( + CoreStrings.NoParameterlessConstructor( + ((IReadOnlyEntityType)entityType).DisplayName())); } + } - var contextParam = Expression.Parameter(typeof(MaterializationContext), "mc"); + var contextParam = Expression.Parameter(typeof(MaterializationContext), "mc"); - return Expression.Lambda>( - binding.CreateConstructorExpression( - new ParameterBindingInfo(entityType, contextParam)), - contextParam) - .Compile(); - }); + return Expression.Lambda>( + binding.CreateConstructorExpression( + new ParameterBindingInfo(entityType, contextParam)), + contextParam) + .Compile(); + }); /// [DebuggerStepThrough] diff --git a/src/EFCore/Metadata/RuntimeModel.cs b/src/EFCore/Metadata/RuntimeModel.cs index d4284806ae1..b60a753bd01 100644 --- a/src/EFCore/Metadata/RuntimeModel.cs +++ b/src/EFCore/Metadata/RuntimeModel.cs @@ -17,18 +17,18 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// + /// Metadata about the shape of entities, the relationships between them, and how they map to + /// the database. A model is typically created by overriding the + /// method on a derived + /// . + /// + /// /// - /// Metadata about the shape of entities, the relationships between them, and how they map to - /// the database. A model is typically created by overriding the - /// method on a derived - /// . + /// This is a light-weight implementation that is constructed from a built model and is not meant to be used at design-time. /// /// - /// This is a light-weight implementation that is constructed from a built model and is not meant to be used at design-time. + /// See Modeling entity types and relationships for more information. /// - /// - /// - /// See Modeling entity types and relationships for more information. /// public class RuntimeModel : AnnotatableBase, IRuntimeModel { diff --git a/src/EFCore/Metadata/ServiceParameterBindingFactory.cs b/src/EFCore/Metadata/ServiceParameterBindingFactory.cs index 3ecff01accb..4c2b934d443 100644 --- a/src/EFCore/Metadata/ServiceParameterBindingFactory.cs +++ b/src/EFCore/Metadata/ServiceParameterBindingFactory.cs @@ -9,18 +9,18 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// A for binding to dependency-injected services. - /// + /// A for binding to dependency-injected services. + /// + /// /// /// The service lifetime is and multiple registrations /// are allowed. This means a single instance of each service is used by many /// instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Entity types with constructors for more information. + /// + /// See Entity types with constructors for more information. + /// /// public class ServiceParameterBindingFactory : IParameterBindingFactory { diff --git a/src/EFCore/Metadata/ValueGenerated.cs b/src/EFCore/Metadata/ValueGenerated.cs index 2ebc3de2f3b..d27e388087d 100644 --- a/src/EFCore/Metadata/ValueGenerated.cs +++ b/src/EFCore/Metadata/ValueGenerated.cs @@ -6,19 +6,19 @@ namespace Microsoft.EntityFrameworkCore.Metadata { /// - /// - /// Indicates when a value for a property will be generated by the database. - /// + /// Indicates when a value for a property will be generated by the database. + /// + /// /// /// Even when a property is set to be generated by the database, EF may still attempt to save /// a specific value (rather than having one generated by the database) when an entity is added /// and a value is assigned, or the property is marked as modified for an existing entity. /// See for more details. /// - /// - /// - /// See Modeling entity types and relationships and - /// See Value generation in EF Core for more information. + /// + /// See Modeling entity types and relationships and + /// See Value generation in EF Core for more information. + /// /// [Flags] public enum ValueGenerated diff --git a/src/EFCore/ModelBuilder.cs b/src/EFCore/ModelBuilder.cs index d7319666a0b..42914e1b10b 100644 --- a/src/EFCore/ModelBuilder.cs +++ b/src/EFCore/ModelBuilder.cs @@ -15,18 +15,18 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// Provides a simple API surface for configuring a that defines the shape of your - /// entities, the relationships between them, and how they map to the database. - /// + /// Provides a simple API surface for configuring a that defines the shape of your + /// entities, the relationships between them, and how they map to the database. + /// + /// /// /// You can use to construct a model for a context by overriding /// on your derived context. Alternatively you can create the /// model externally and set it on a instance that is passed to the context constructor. /// - /// - /// - /// See Modeling entity types and relationships in EF Core for more information. + /// + /// See Modeling entity types and relationships in EF Core for more information. + /// /// public class ModelBuilder : IInfrastructure { @@ -136,14 +136,12 @@ public virtual ModelBuilder HasAnnotation(string annotation, object? value) } /// - /// - /// The internal being used to configure this model. - /// - /// - /// This property is intended for use by extension methods to configure the model. It is not intended to be used in - /// application code. - /// + /// The internal being used to configure this model. /// + /// + /// This property is intended for use by extension methods to configure the model. It is not intended to be used in + /// application code. + /// IConventionModelBuilder IInfrastructure.Instance => _builder; @@ -161,9 +159,9 @@ public virtual EntityTypeBuilder Entity() => new(Builder.Entity(typeof(TEntity), ConfigurationSource.Explicit, shouldBeOwned: false)!.Metadata); /// - /// - /// Returns an object that can be used to configure a given shared type entity type in the model. - /// + /// Returns an object that can be used to configure a given shared type entity type in the model. + /// + /// /// /// If an entity type with the provided name is not already part of the model, a new entity type with provided CLR /// type will be added to the model as shared type entity type. @@ -172,10 +170,10 @@ public virtual EntityTypeBuilder Entity() /// Shared type entity type is an entity type which can share CLR type with other types in the model but has /// a unique name and always identified by the name. /// - /// - /// - /// See Modeling entity types and - /// Shared entity types for more information. + /// + /// See Modeling entity types and + /// Shared entity types for more information. + /// /// /// The CLR type of the entity type to be configured. /// The name of the entity type to be configured. @@ -222,9 +220,9 @@ public virtual EntityTypeBuilder Entity(string name) } /// - /// - /// Returns an object that can be used to configure a given shared type entity type in the model. - /// + /// Returns an object that can be used to configure a given shared type entity type in the model. + /// + /// /// /// If an entity type with the provided name is not already part of the model, a new entity type with provided CLR /// type will be added to the model as shared type entity type. @@ -233,10 +231,10 @@ public virtual EntityTypeBuilder Entity(string name) /// Shared type entity type is an entity type which can share CLR type with other types in the model but has /// a unique name and always identified by the name. /// - /// - /// - /// See Modeling entity types and - /// Shared entity types for more information. + /// + /// See Modeling entity types and + /// Shared entity types for more information. + /// /// /// The name of the entity type to be configured. /// The CLR type of the entity type to be configured. @@ -251,18 +249,18 @@ public virtual EntityTypeBuilder SharedTypeEntity(string name, Type type) } /// - /// - /// Performs configuration of a given entity type in the model. If the entity type is not already part - /// of the model, it will be added to the model. - /// + /// Performs configuration of a given entity type in the model. If the entity type is not already part + /// of the model, it will be added to the model. + /// + /// /// /// This overload allows configuration of the entity type to be done in line in the method call rather /// than being chained after a call to . This allows additional /// configuration at the model level to be chained after configuration for the entity type. /// - /// - /// - /// See Modeling entity types for more information. + /// + /// See Modeling entity types for more information. + /// /// /// The entity type to be configured. /// An action that performs configuration of the entity type. @@ -280,9 +278,9 @@ public virtual ModelBuilder Entity(Action> b } /// - /// - /// Returns an object that can be used to configure a given shared type entity type in the model. - /// + /// Returns an object that can be used to configure a given shared type entity type in the model. + /// + /// /// /// If an entity type with the provided name is not already part of the model, a new entity type with provided CLR /// type will be added to the model as shared type entity type. @@ -296,10 +294,10 @@ public virtual ModelBuilder Entity(Action> b /// than being chained after a call to . This allows additional /// configuration at the model level to be chained after configuration for the entity type. /// - /// - /// - /// See Modeling entity types and - /// Shared entity types for more information. + /// + /// See Modeling entity types and + /// Shared entity types for more information. + /// /// /// The CLR type of the entity type to be configured. /// The name of the entity type to be configured. @@ -320,18 +318,18 @@ public virtual ModelBuilder SharedTypeEntity( } /// - /// - /// Performs configuration of a given entity type in the model. If the entity type is not already part - /// of the model, it will be added to the model. - /// + /// Performs configuration of a given entity type in the model. If the entity type is not already part + /// of the model, it will be added to the model. + /// + /// /// /// This overload allows configuration of the entity type to be done in line in the method call rather /// than being chained after a call to . This allows additional /// configuration at the model level to be chained after configuration for the entity type. /// - /// - /// - /// See Modeling entity types for more information. + /// + /// See Modeling entity types for more information. + /// /// /// The entity type to be configured. /// An action that performs configuration of the entity type. @@ -348,19 +346,19 @@ public virtual ModelBuilder Entity(Type type, Action buildAct } /// - /// - /// Performs configuration of a given entity type in the model. - /// If an entity type with the provided name is not already part of the model, - /// a new entity type that does not have a corresponding CLR type will be added to the model. - /// + /// Performs configuration of a given entity type in the model. + /// If an entity type with the provided name is not already part of the model, + /// a new entity type that does not have a corresponding CLR type will be added to the model. + /// + /// /// /// This overload allows configuration of the entity type to be done in line in the method call rather /// than being chained after a call to . This allows additional /// configuration at the model level to be chained after configuration for the entity type. /// - /// - /// - /// See Modeling entity types for more information. + /// + /// See Modeling entity types for more information. + /// /// /// The name of the entity type to be configured. /// An action that performs configuration of the entity type. @@ -377,9 +375,9 @@ public virtual ModelBuilder Entity(string name, Action buildA } /// - /// - /// Returns an object that can be used to configure a given shared type entity type in the model. - /// + /// Returns an object that can be used to configure a given shared type entity type in the model. + /// + /// /// /// If an entity type with the provided name is not already part of the model, a new entity type with provided CLR /// type will be added to the model as shared type entity type. @@ -393,10 +391,10 @@ public virtual ModelBuilder Entity(string name, Action buildA /// than being chained after a call to . This allows additional /// configuration at the model level to be chained after configuration for the entity type. /// - /// - /// - /// See Modeling entity types and - /// Shared entity types for more information. + /// + /// See Modeling entity types and + /// Shared entity types for more information. + /// /// /// The name of the entity type to be configured. /// The CLR type of the entity type to be configured. @@ -596,18 +594,18 @@ public virtual ModelBuilder HasChangeTrackingStrategy(ChangeTrackingStrategy cha } /// - /// - /// Sets the to use for all properties of this entity type. - /// + /// Sets the to use for all properties of this entity type. + /// + /// /// /// By default, the backing field, if one is found by convention or has been specified, is used when /// new objects are constructed, typically when entities are queried from the database. /// Properties are used for all other accesses. Calling this method will change that behavior /// for all properties in the model as described in the enum. /// - /// - /// - /// See Property versus field access in EF Core for more information. + /// + /// See Property versus field access in EF Core for more information. + /// /// /// The to use for properties of this model. /// diff --git a/src/EFCore/ModelConfigurationBuilder.cs b/src/EFCore/ModelConfigurationBuilder.cs index 6d449fb933f..873ad6dee8b 100644 --- a/src/EFCore/ModelConfigurationBuilder.cs +++ b/src/EFCore/ModelConfigurationBuilder.cs @@ -12,18 +12,18 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// Provides a simple API surface for setting defaults and configuring conventions before they run. - /// + /// Provides a simple API surface for setting defaults and configuring conventions before they run. + /// + /// /// /// You can use to configure the conventions for a context by overriding /// on your derived context. /// Alternatively you can create the model externally and set it on a instance /// that is passed to the context constructor. /// - /// - /// - /// See Pre-convention model building in EF Core for more information. + /// + /// See Pre-convention model building in EF Core for more information. + /// /// public class ModelConfigurationBuilder { @@ -87,15 +87,15 @@ public virtual ModelConfigurationBuilder IgnoreAny(Type type) } /// + /// Marks the given and derived types as corresponding to entity type properties. + /// + /// /// - /// Marks the given and derived types as corresponding to entity type properties. + /// This can also be called on an interface to apply the configuration to all properties of implementing types. /// /// - /// This can also be called on an interface to apply the configuration to all properties of implementing types. + /// See Pre-convention model building in EF Core for more information. /// - /// - /// - /// See Pre-convention model building in EF Core for more information. /// /// The property type to be configured. /// An object that can be used to configure the properties. @@ -107,15 +107,15 @@ public virtual PropertiesConfigurationBuilder Properties() } /// + /// Marks the given and derived types as corresponding to entity type properties. + /// + /// /// - /// Marks the given and derived types as corresponding to entity type properties. + /// This can also be called on an interface to apply the configuration to all properties of implementing types. /// /// - /// This can also be called on an interface to apply the configuration to all properties of implementing types. + /// See Pre-convention model building in EF Core for more information. /// - /// - /// - /// See Pre-convention model building in EF Core for more information. /// /// The property type to be configured. /// An action that performs configuration of the property. @@ -134,16 +134,16 @@ public virtual ModelConfigurationBuilder Properties( } /// - /// - /// Marks the given and derived types as corresponding to entity type properties. - /// + /// Marks the given and derived types as corresponding to entity type properties. + /// + /// /// /// This can also be called on an interface or an unbound generic type to apply the configuration to all /// properties of implementing and constructed types. /// - /// - /// - /// See Pre-convention model building in EF Core for more information. + /// + /// See Pre-convention model building in EF Core for more information. + /// /// /// The property type to be configured. /// An object that can be used to configure the property. @@ -157,16 +157,16 @@ public virtual PropertiesConfigurationBuilder Properties(Type propertyType) } /// - /// - /// Marks the given and derived types as corresponding to entity type properties. - /// + /// Marks the given and derived types as corresponding to entity type properties. + /// + /// /// /// This can also be called on an interface or an unbound generic type to apply the configuration to all /// properties of implementing and constructed types. /// - /// - /// - /// See Pre-convention model building in EF Core for more information. + /// + /// See Pre-convention model building in EF Core for more information. + /// /// /// The property type to be configured. /// An action that performs configuration of the property. @@ -187,10 +187,10 @@ public virtual ModelConfigurationBuilder Properties( } /// - /// - /// Marks the given type as a scalar, even when used outside of entity types. This allows values of this type - /// to be used in queries that are not referencing property of this type. - /// + /// Marks the given type as a scalar, even when used outside of entity types. This allows values of this type + /// to be used in queries that are not referencing property of this type. + /// + /// /// /// Unlike this method should only be called on a non-nullable concrete type. /// Calling it on a base type will not apply the configuration to the derived types. @@ -199,9 +199,9 @@ public virtual ModelConfigurationBuilder Properties( /// Calling this is rarely needed. If there are properties of the given type calling /// should be enough in most cases. /// - /// - /// - /// See Pre-convention model building in EF Core for more information. + /// + /// See Pre-convention model building in EF Core for more information. + /// /// /// The scalar type to be configured. /// An object that can be used to configure the scalars. @@ -213,10 +213,10 @@ public virtual TypeMappingConfigurationBuilder DefaultTypeMapping - /// - /// Marks the given type as a scalar, even when used outside of entity types. This allows values of this type - /// to be used in queries that are not referencing property of this type. - /// + /// Marks the given type as a scalar, even when used outside of entity types. This allows values of this type + /// to be used in queries that are not referencing property of this type. + /// + /// /// /// Unlike this method should only be called on a non-nullable concrete type. /// Calling it on a base type will not apply the configuration to the derived types. @@ -225,9 +225,9 @@ public virtual TypeMappingConfigurationBuilder DefaultTypeMapping /// should be enough in most cases. /// - /// - /// - /// See Pre-convention model building in EF Core for more information. + /// + /// See Pre-convention model building in EF Core for more information. + /// /// /// The scalar type to be configured. /// An action that performs configuration for the scalars. @@ -246,10 +246,10 @@ public virtual ModelConfigurationBuilder DefaultTypeMapping( } /// - /// - /// Marks the given type as a scalar, even when used outside of entity types. This allows values of this type - /// to be used in queries that are not referencing property of this type. - /// + /// Marks the given type as a scalar, even when used outside of entity types. This allows values of this type + /// to be used in queries that are not referencing property of this type. + /// + /// /// /// Unlike this method should only be called on a non-nullable concrete type. /// Calling it on a base type will not apply the configuration to the derived types. @@ -258,9 +258,9 @@ public virtual ModelConfigurationBuilder DefaultTypeMapping( /// Calling this is rarely needed. If there are properties of the given type calling /// should be enough in most cases. /// - /// - /// - /// See Pre-convention model building in EF Core for more information. + /// + /// See Pre-convention model building in EF Core for more information. + /// /// /// The scalar type to be configured. /// An object that can be used to configure the scalars. @@ -274,10 +274,10 @@ public virtual TypeMappingConfigurationBuilder DefaultTypeMapping(Type scalarTyp } /// - /// - /// Marks the given type as a scalar, even when used outside of entity types. This allows values of this type - /// to be used in queries that are not referencing property of this type. - /// + /// Marks the given type as a scalar, even when used outside of entity types. This allows values of this type + /// to be used in queries that are not referencing property of this type. + /// + /// /// /// Unlike this method should only be called on a non-nullable concrete type. /// Calling it on a base type will not apply the configuration to the derived types. @@ -286,9 +286,9 @@ public virtual TypeMappingConfigurationBuilder DefaultTypeMapping(Type scalarTyp /// Calling this is rarely needed. If there are properties of the given type calling /// should be enough in most cases. /// - /// - /// - /// See Pre-convention model building in EF Core for more information. + /// + /// See Pre-convention model building in EF Core for more information. + /// /// /// The scalar type to be configured. /// An action that performs configuration for the scalars. diff --git a/src/EFCore/PropertyAccessMode.cs b/src/EFCore/PropertyAccessMode.cs index be6bacb0104..292a02d42bb 100644 --- a/src/EFCore/PropertyAccessMode.cs +++ b/src/EFCore/PropertyAccessMode.cs @@ -6,85 +6,73 @@ namespace Microsoft.EntityFrameworkCore { /// - /// - /// Pass a value from this enum to , - /// , or - /// to change whether the property - /// or backing field will be used when reading and writing to a property or field. - /// + /// Pass a value from this enum to , + /// , or + /// to change whether the property + /// or backing field will be used when reading and writing to a property or field. + /// + /// /// /// The default behavior is . Prior to EF Core 3.0, /// the default behavior was . /// - /// - /// - /// See Property versus field access in EF Core for more information. + /// + /// See Property versus field access in EF Core for more information. + /// /// public enum PropertyAccessMode { /// - /// - /// Enforces that all accesses to the property must go through the field. - /// - /// - /// An exception will be thrown if this mode is set and it is not possible to read - /// from or write to the field. - /// + /// Enforces that all accesses to the property must go through the field. /// + /// + /// An exception will be thrown if this mode is set and it is not possible to read + /// from or write to the field. + /// Field, /// - /// - /// Enforces that all accesses to the property must go through the field when - /// new instances are being constructed. New instances are typically constructed when - /// entities are queried from the database. - /// An exception will be thrown if this mode is set and it is not possible to - /// write to the field. - /// - /// - /// All other uses of the property will go through the property getters and setters, - /// unless this is not possible because, for example, the property is read-only, in which - /// case these accesses will also use the field. - /// + /// Enforces that all accesses to the property must go through the field when + /// new instances are being constructed. New instances are typically constructed when + /// entities are queried from the database. + /// An exception will be thrown if this mode is set and it is not possible to + /// write to the field. /// + /// + /// All other uses of the property will go through the property getters and setters, + /// unless this is not possible because, for example, the property is read-only, in which + /// case these accesses will also use the field. + /// FieldDuringConstruction, /// - /// - /// Enforces that all accesses to the property must go through the property - /// getters and setters, even when new objects are being constructed. - /// - /// - /// An exception will be thrown if this mode is set and it is not possible to read - /// from or write to the property, for example because it is read-only. - /// + /// Enforces that all accesses to the property must go through the property + /// getters and setters, even when new objects are being constructed. /// + /// + /// An exception will be thrown if this mode is set and it is not possible to read + /// from or write to the property, for example because it is read-only. + /// Property, /// - /// - /// All accesses to the property goes directly to the field, unless the field is - /// not known, in which as access goes through the property. - /// + /// All accesses to the property goes directly to the field, unless the field is + /// not known, in which as access goes through the property. /// PreferField, /// - /// - /// All accesses to the property when constructing new entity instances goes directly - /// to the field, unless the field is not known, in which as access goes through the property. - /// All other uses of the property will go through the property getters and setters, - /// unless this is not possible because, for example, the property is read-only, in which - /// case these accesses will also use the field. - /// + /// All accesses to the property when constructing new entity instances goes directly + /// to the field, unless the field is not known, in which as access goes through the property. + /// All other uses of the property will go through the property getters and setters, + /// unless this is not possible because, for example, the property is read-only, in which + /// case these accesses will also use the field. /// PreferFieldDuringConstruction, /// - /// - /// All accesses to the property go through the property, unless there is no property or - /// it is missing a setter/getter, in which as access goes directly to the field. - /// + /// All accesses to the property go through the property, unless there is no property or + /// it is missing a setter/getter, in which as access goes directly to the field. /// PreferProperty } diff --git a/src/EFCore/Query/CompiledQueryCacheKeyGenerator.cs b/src/EFCore/Query/CompiledQueryCacheKeyGenerator.cs index 73f90fabcfd..e8a7e4ec95e 100644 --- a/src/EFCore/Query/CompiledQueryCacheKeyGenerator.cs +++ b/src/EFCore/Query/CompiledQueryCacheKeyGenerator.cs @@ -18,16 +18,18 @@ namespace Microsoft.EntityFrameworkCore.Query /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public class CompiledQueryCacheKeyGenerator : ICompiledQueryCacheKeyGenerator { diff --git a/src/EFCore/Query/CompiledQueryCacheKeyGeneratorDependencies.cs b/src/EFCore/Query/CompiledQueryCacheKeyGeneratorDependencies.cs index efeb0753db1..d9fd0d1ea3d 100644 --- a/src/EFCore/Query/CompiledQueryCacheKeyGeneratorDependencies.cs +++ b/src/EFCore/Query/CompiledQueryCacheKeyGeneratorDependencies.cs @@ -16,6 +16,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -30,32 +32,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record CompiledQueryCacheKeyGeneratorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// This type is typically used by database providers (and other extensions). It is generally - /// not used in application code. - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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 . This means that each - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public CompiledQueryCacheKeyGeneratorDependencies( IModel model, diff --git a/src/EFCore/Query/EvaluatableExpressionFilter.cs b/src/EFCore/Query/EvaluatableExpressionFilter.cs index 15cd421fda3..bd645f727df 100644 --- a/src/EFCore/Query/EvaluatableExpressionFilter.cs +++ b/src/EFCore/Query/EvaluatableExpressionFilter.cs @@ -11,18 +11,18 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Represents a filter for evaluatable expressions. - /// + /// Represents a filter for evaluatable expressions. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public class EvaluatableExpressionFilter : IEvaluatableExpressionFilter { diff --git a/src/EFCore/Query/EvaluatableExpressionFilterDependencies.cs b/src/EFCore/Query/EvaluatableExpressionFilterDependencies.cs index a6a0fbf7e11..d86cfdb023e 100644 --- a/src/EFCore/Query/EvaluatableExpressionFilterDependencies.cs +++ b/src/EFCore/Query/EvaluatableExpressionFilterDependencies.cs @@ -16,6 +16,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -29,28 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record EvaluatableExpressionFilterDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public EvaluatableExpressionFilterDependencies(IEnumerable plugins) { diff --git a/src/EFCore/Query/IAsyncQueryProvider.cs b/src/EFCore/Query/IAsyncQueryProvider.cs index de6c198f908..46ffff7dc5b 100644 --- a/src/EFCore/Query/IAsyncQueryProvider.cs +++ b/src/EFCore/Query/IAsyncQueryProvider.cs @@ -9,19 +9,19 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Defines method to execute queries asynchronously that are described by an IQueryable object. - /// + /// Defines method to execute queries asynchronously that are described by an IQueryable object. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public interface IAsyncQueryProvider : IQueryProvider { diff --git a/src/EFCore/Query/ICompiledQueryCacheKeyGenerator.cs b/src/EFCore/Query/ICompiledQueryCacheKeyGenerator.cs index bdf6e80b705..95d923e4b8b 100644 --- a/src/EFCore/Query/ICompiledQueryCacheKeyGenerator.cs +++ b/src/EFCore/Query/ICompiledQueryCacheKeyGenerator.cs @@ -7,19 +7,19 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// A cache key generator for the compiled query cache. - /// + /// A cache key generator for the compiled query cache. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public interface ICompiledQueryCacheKeyGenerator { diff --git a/src/EFCore/Query/IEntityMaterializerSource.cs b/src/EFCore/Query/IEntityMaterializerSource.cs index 77603b6bd5d..02aed2d86b6 100644 --- a/src/EFCore/Query/IEntityMaterializerSource.cs +++ b/src/EFCore/Query/IEntityMaterializerSource.cs @@ -18,15 +18,17 @@ namespace Microsoft.EntityFrameworkCore.Query /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public interface IEntityMaterializerSource { diff --git a/src/EFCore/Query/IEvaluatableExpressionFilter.cs b/src/EFCore/Query/IEvaluatableExpressionFilter.cs index 5159d1d1b2d..ed9ef3a3871 100644 --- a/src/EFCore/Query/IEvaluatableExpressionFilter.cs +++ b/src/EFCore/Query/IEvaluatableExpressionFilter.cs @@ -8,18 +8,18 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Represents a filter for evaluatable expressions. - /// + /// Represents a filter for evaluatable expressions. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public interface IEvaluatableExpressionFilter { diff --git a/src/EFCore/Query/IEvaluatableExpressionFilterPlugin.cs b/src/EFCore/Query/IEvaluatableExpressionFilterPlugin.cs index 70b5b7794c4..2abf7f79b61 100644 --- a/src/EFCore/Query/IEvaluatableExpressionFilterPlugin.cs +++ b/src/EFCore/Query/IEvaluatableExpressionFilterPlugin.cs @@ -7,19 +7,19 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Represents a plugin evaluatable expression filter. - /// + /// Represents a plugin evaluatable expression filter. + /// + /// /// /// The service lifetime is and multiple registrations /// are allowed. This means a single instance of each service is used by many /// instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public interface IEvaluatableExpressionFilterPlugin { diff --git a/src/EFCore/Query/IQueryCompilationContextFactory.cs b/src/EFCore/Query/IQueryCompilationContextFactory.cs index d9b1510cbe7..cc56e5bf329 100644 --- a/src/EFCore/Query/IQueryCompilationContextFactory.cs +++ b/src/EFCore/Query/IQueryCompilationContextFactory.cs @@ -6,19 +6,19 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// A factory for creating instances. - /// + /// A factory for creating instances. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public interface IQueryCompilationContextFactory { diff --git a/src/EFCore/Query/IQueryContextFactory.cs b/src/EFCore/Query/IQueryContextFactory.cs index 5493cd4fb0c..71ce127614d 100644 --- a/src/EFCore/Query/IQueryContextFactory.cs +++ b/src/EFCore/Query/IQueryContextFactory.cs @@ -6,19 +6,19 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// Factory for instances. - /// + /// Factory for instances. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public interface IQueryContextFactory { diff --git a/src/EFCore/Query/IQueryTranslationPostprocessorFactory.cs b/src/EFCore/Query/IQueryTranslationPostprocessorFactory.cs index 106b3ae3df1..e023bca4f2c 100644 --- a/src/EFCore/Query/IQueryTranslationPostprocessorFactory.cs +++ b/src/EFCore/Query/IQueryTranslationPostprocessorFactory.cs @@ -6,19 +6,19 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// A factory for creating instances. - /// + /// A factory for creating instances. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public interface IQueryTranslationPostprocessorFactory { diff --git a/src/EFCore/Query/IQueryTranslationPreprocessorFactory.cs b/src/EFCore/Query/IQueryTranslationPreprocessorFactory.cs index cde34d9eed3..b496b75ee15 100644 --- a/src/EFCore/Query/IQueryTranslationPreprocessorFactory.cs +++ b/src/EFCore/Query/IQueryTranslationPreprocessorFactory.cs @@ -6,19 +6,19 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// A factory for creating instances. - /// + /// A factory for creating instances. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public interface IQueryTranslationPreprocessorFactory { diff --git a/src/EFCore/Query/IQueryableMethodTranslatingExpressionVisitorFactory.cs b/src/EFCore/Query/IQueryableMethodTranslatingExpressionVisitorFactory.cs index 3a03c90e3e6..fbbdc5c7e24 100644 --- a/src/EFCore/Query/IQueryableMethodTranslatingExpressionVisitorFactory.cs +++ b/src/EFCore/Query/IQueryableMethodTranslatingExpressionVisitorFactory.cs @@ -6,18 +6,18 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// A factory for creating instances. - /// + /// A factory for creating instances. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public interface IQueryableMethodTranslatingExpressionVisitorFactory { diff --git a/src/EFCore/Query/IShapedQueryCompilingExpressionVisitorFactory.cs b/src/EFCore/Query/IShapedQueryCompilingExpressionVisitorFactory.cs index 9bee1e23b8e..62f52756145 100644 --- a/src/EFCore/Query/IShapedQueryCompilingExpressionVisitorFactory.cs +++ b/src/EFCore/Query/IShapedQueryCompilingExpressionVisitorFactory.cs @@ -6,19 +6,19 @@ namespace Microsoft.EntityFrameworkCore.Query { /// - /// - /// A factory for creating instances. - /// + /// A factory for creating instances. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. + /// + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. + /// /// public interface IShapedQueryCompilingExpressionVisitorFactory { diff --git a/src/EFCore/Query/Internal/CompiledQueryCache.cs b/src/EFCore/Query/Internal/CompiledQueryCache.cs index a95e004a505..20c7e969bde 100644 --- a/src/EFCore/Query/Internal/CompiledQueryCache.cs +++ b/src/EFCore/Query/Internal/CompiledQueryCache.cs @@ -10,18 +10,16 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class CompiledQueryCache : ICompiledQueryCache { private static readonly ConcurrentDictionary _locks = new(); diff --git a/src/EFCore/Query/Internal/EntityMaterializerSource.cs b/src/EFCore/Query/Internal/EntityMaterializerSource.cs index ceeaaff7719..23f12c4da07 100644 --- a/src/EFCore/Query/Internal/EntityMaterializerSource.cs +++ b/src/EFCore/Query/Internal/EntityMaterializerSource.cs @@ -17,18 +17,16 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class EntityMaterializerSource : IEntityMaterializerSource { private ConcurrentDictionary>? _materializers; @@ -148,14 +146,14 @@ private ConcurrentDictionary> public virtual Func GetMaterializer(IEntityType entityType) => Materializers.GetOrAdd( entityType, e => - { - var materializationContextParameter - = Expression.Parameter(typeof(MaterializationContext), "materializationContext"); - - return Expression.Lambda>( - CreateMaterializeExpression(e, "instance", materializationContextParameter), - materializationContextParameter) - .Compile(); - }); + { + var materializationContextParameter + = Expression.Parameter(typeof(MaterializationContext), "materializationContext"); + + return Expression.Lambda>( + CreateMaterializeExpression(e, "instance", materializationContextParameter), + materializationContextParameter) + .Compile(); + }); } } diff --git a/src/EFCore/Query/Internal/EntityMaterializerSourceDependencies.cs b/src/EFCore/Query/Internal/EntityMaterializerSourceDependencies.cs index 59832589950..37619be6368 100644 --- a/src/EFCore/Query/Internal/EntityMaterializerSourceDependencies.cs +++ b/src/EFCore/Query/Internal/EntityMaterializerSourceDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal /// 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 @@ -27,28 +29,23 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record EntityMaterializerSourceDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public EntityMaterializerSourceDependencies() { diff --git a/src/EFCore/Query/Internal/EntityQueryProvider.cs b/src/EFCore/Query/Internal/EntityQueryProvider.cs index 47ec883fb24..811cfb383c6 100644 --- a/src/EFCore/Query/Internal/EntityQueryProvider.cs +++ b/src/EFCore/Query/Internal/EntityQueryProvider.cs @@ -11,19 +11,17 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class EntityQueryProvider : IAsyncQueryProvider { private static readonly MethodInfo _genericCreateQueryMethod diff --git a/src/EFCore/Query/Internal/ICompiledQueryCache.cs b/src/EFCore/Query/Internal/ICompiledQueryCache.cs index 1fc81c91e96..a0b04fb2d30 100644 --- a/src/EFCore/Query/Internal/ICompiledQueryCache.cs +++ b/src/EFCore/Query/Internal/ICompiledQueryCache.cs @@ -7,18 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public interface ICompiledQueryCache { /// diff --git a/src/EFCore/Query/Internal/IQueryCompiler.cs b/src/EFCore/Query/Internal/IQueryCompiler.cs index b2dbc8bff85..12c8ad8cfe0 100644 --- a/src/EFCore/Query/Internal/IQueryCompiler.cs +++ b/src/EFCore/Query/Internal/IQueryCompiler.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 interface IQueryCompiler { /// diff --git a/src/EFCore/Query/Internal/NullAsyncQueryProvider.cs b/src/EFCore/Query/Internal/NullAsyncQueryProvider.cs index 346b691ff13..ed6dd529eeb 100644 --- a/src/EFCore/Query/Internal/NullAsyncQueryProvider.cs +++ b/src/EFCore/Query/Internal/NullAsyncQueryProvider.cs @@ -10,19 +10,17 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class NullAsyncQueryProvider : IAsyncQueryProvider { /// diff --git a/src/EFCore/Query/Internal/QueryCompilationContextFactory.cs b/src/EFCore/Query/Internal/QueryCompilationContextFactory.cs index 1b377c8ade2..ba468e95cfa 100644 --- a/src/EFCore/Query/Internal/QueryCompilationContextFactory.cs +++ b/src/EFCore/Query/Internal/QueryCompilationContextFactory.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class QueryCompilationContextFactory : IQueryCompilationContextFactory { /// diff --git a/src/EFCore/Query/Internal/QueryCompiler.cs b/src/EFCore/Query/Internal/QueryCompiler.cs index 77b6f14bad7..c91a62e3b26 100644 --- a/src/EFCore/Query/Internal/QueryCompiler.cs +++ b/src/EFCore/Query/Internal/QueryCompiler.cs @@ -14,19 +14,17 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class QueryCompiler : IQueryCompiler { private readonly IQueryContextFactory _queryContextFactory; diff --git a/src/EFCore/Query/Internal/QueryTranslationPostprocessorFactory.cs b/src/EFCore/Query/Internal/QueryTranslationPostprocessorFactory.cs index e244c7bca74..a5c4aa595aa 100644 --- a/src/EFCore/Query/Internal/QueryTranslationPostprocessorFactory.cs +++ b/src/EFCore/Query/Internal/QueryTranslationPostprocessorFactory.cs @@ -7,18 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class QueryTranslationPostprocessorFactory : IQueryTranslationPostprocessorFactory { /// diff --git a/src/EFCore/Query/Internal/QueryTranslationPreprocessorFactory.cs b/src/EFCore/Query/Internal/QueryTranslationPreprocessorFactory.cs index dd83e5eed5d..58622bc6b4f 100644 --- a/src/EFCore/Query/Internal/QueryTranslationPreprocessorFactory.cs +++ b/src/EFCore/Query/Internal/QueryTranslationPreprocessorFactory.cs @@ -7,18 +7,16 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means a single instance - /// is used by many instances. The implementation must be thread-safe. - /// This service cannot depend on services registered as . - /// + /// 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. /// + /// + /// The service lifetime is . This means a single instance + /// is used by many instances. The implementation must be thread-safe. + /// This service cannot depend on services registered as . + /// public class QueryTranslationPreprocessorFactory : IQueryTranslationPreprocessorFactory { /// diff --git a/src/EFCore/Query/NavigationExpansionExtensibilityHelperDependencies.cs b/src/EFCore/Query/NavigationExpansionExtensibilityHelperDependencies.cs index 68d2b988e25..98074af6681 100644 --- a/src/EFCore/Query/NavigationExpansionExtensibilityHelperDependencies.cs +++ b/src/EFCore/Query/NavigationExpansionExtensibilityHelperDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -27,28 +29,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record NavigationExpansionExtensibilityHelperDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public NavigationExpansionExtensibilityHelperDependencies() { diff --git a/src/EFCore/Query/ProjectionMember.cs b/src/EFCore/Query/ProjectionMember.cs index d55c30f4257..9cf91fc9dcf 100644 --- a/src/EFCore/Query/ProjectionMember.cs +++ b/src/EFCore/Query/ProjectionMember.cs @@ -74,13 +74,11 @@ public ProjectionMember Prepend(MemberInfo member) } /// - /// - /// The last MemberInfo in the chain of MemberInfo represented by this projection member. - /// - /// - /// This method is generally used to get last memberInfo to generate an alias for projection. - /// + /// The last MemberInfo in the chain of MemberInfo represented by this projection member. /// + /// + /// This method is generally used to get last memberInfo to generate an alias for projection. + /// public MemberInfo? Last => _memberChain.LastOrDefault(); diff --git a/src/EFCore/Query/QueryCompilationContextDependencies.cs b/src/EFCore/Query/QueryCompilationContextDependencies.cs index 8d6ed19a77d..b8d0cbc290c 100644 --- a/src/EFCore/Query/QueryCompilationContextDependencies.cs +++ b/src/EFCore/Query/QueryCompilationContextDependencies.cs @@ -18,6 +18,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -32,30 +34,25 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record QueryCompilationContextDependencies { private readonly ICurrentDbContext _currentContext; /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public QueryCompilationContextDependencies( IModel model, diff --git a/src/EFCore/Query/QueryContextDependencies.cs b/src/EFCore/Query/QueryContextDependencies.cs index 656ebb9b387..ce115e66e36 100644 --- a/src/EFCore/Query/QueryContextDependencies.cs +++ b/src/EFCore/Query/QueryContextDependencies.cs @@ -20,6 +20,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -34,28 +36,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record QueryContextDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public QueryContextDependencies( ICurrentDbContext currentContext, diff --git a/src/EFCore/Query/QueryTranslationPostprocessorDependencies.cs b/src/EFCore/Query/QueryTranslationPostprocessorDependencies.cs index aecf2df8e5b..d67efc71c5c 100644 --- a/src/EFCore/Query/QueryTranslationPostprocessorDependencies.cs +++ b/src/EFCore/Query/QueryTranslationPostprocessorDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -28,28 +30,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record QueryTranslationPostprocessorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public QueryTranslationPostprocessorDependencies() { diff --git a/src/EFCore/Query/QueryTranslationPreprocessor.cs b/src/EFCore/Query/QueryTranslationPreprocessor.cs index 1bf8da2810e..80bb7dea857 100644 --- a/src/EFCore/Query/QueryTranslationPreprocessor.cs +++ b/src/EFCore/Query/QueryTranslationPreprocessor.cs @@ -74,15 +74,13 @@ public virtual Expression Process(Expression query) } /// - /// - /// Normalizes queryable methods in the query. - /// - /// - /// This method extracts query metadata information like tracking, ignore query filters. - /// It also converts potential enumerable methods on navigation to queryable methods. - /// It flattens patterns of GroupJoin-SelectMany patterns to appropriate Join/LeftJoin. - /// + /// Normalizes queryable methods in the query. /// + /// + /// This method extracts query metadata information like tracking, ignore query filters. + /// It also converts potential enumerable methods on navigation to queryable methods. + /// It flattens patterns of GroupJoin-SelectMany patterns to appropriate Join/LeftJoin. + /// /// The query expression to normalize. /// A query expression after normalization has been done. public virtual Expression NormalizeQueryableMethod(Expression expression) diff --git a/src/EFCore/Query/QueryTranslationPreprocessorDependencies.cs b/src/EFCore/Query/QueryTranslationPreprocessorDependencies.cs index 2d14c7c4e13..8c502a65527 100644 --- a/src/EFCore/Query/QueryTranslationPreprocessorDependencies.cs +++ b/src/EFCore/Query/QueryTranslationPreprocessorDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -29,28 +31,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record QueryTranslationPreprocessorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public QueryTranslationPreprocessorDependencies( IEvaluatableExpressionFilter evaluatableExpressionFilter, diff --git a/src/EFCore/Query/QueryableMethodTranslatingExpressionVisitor.cs b/src/EFCore/Query/QueryableMethodTranslatingExpressionVisitor.cs index 24a9b7e2c7e..d05e1da3da4 100644 --- a/src/EFCore/Query/QueryableMethodTranslatingExpressionVisitor.cs +++ b/src/EFCore/Query/QueryableMethodTranslatingExpressionVisitor.cs @@ -854,14 +854,12 @@ private static Expression AccessInnerTransparentField( LambdaExpression resultSelector); /// - /// - /// Translates LeftJoin over the given source. - /// - /// - /// Certain patterns of GroupJoin-DefaultIfEmpty-SelectMany represents a left join in database. We identify such pattern - /// in advance and convert it to join like syntax. - /// + /// Translates LeftJoin over the given source. /// + /// + /// Certain patterns of GroupJoin-DefaultIfEmpty-SelectMany represents a left join in database. We identify such pattern + /// in advance and convert it to join like syntax. + /// /// The shaped query on which the operator is applied. /// The inner shaped query to perform join with. /// The key selector for the outer source. diff --git a/src/EFCore/Query/QueryableMethodTranslatingExpressionVisitorDependencies.cs b/src/EFCore/Query/QueryableMethodTranslatingExpressionVisitorDependencies.cs index db33336b0da..a0ca0669234 100644 --- a/src/EFCore/Query/QueryableMethodTranslatingExpressionVisitorDependencies.cs +++ b/src/EFCore/Query/QueryableMethodTranslatingExpressionVisitorDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -28,28 +30,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record QueryableMethodTranslatingExpressionVisitorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public QueryableMethodTranslatingExpressionVisitorDependencies() { diff --git a/src/EFCore/Query/ShapedQueryCompilingExpressionVisitor.cs b/src/EFCore/Query/ShapedQueryCompilingExpressionVisitor.cs index 2376d54fc61..9f801bf2e02 100644 --- a/src/EFCore/Query/ShapedQueryCompilingExpressionVisitor.cs +++ b/src/EFCore/Query/ShapedQueryCompilingExpressionVisitor.cs @@ -23,6 +23,12 @@ namespace Microsoft.EntityFrameworkCore.Query /// A class that compiles the shaper expression for given shaped query expression. /// /// + /// This type is typically used by database providers (and other extensions). It is generally + /// not used in application code. + /// + /// + /// + /// /// Materializer is a code which creates entity instance from the given property values. /// It takes into account constructor bindings, fields, property access mode configured in the model when creating the instance. /// @@ -31,13 +37,9 @@ namespace Microsoft.EntityFrameworkCore.Query /// A shaper can contain zero or more materializers inside it. /// /// - /// This type is typically used by database providers (and other extensions). It is generally - /// not used in application code. + /// See Implementation of database providers and extensions + /// and How EF Core queries work for more information. /// - /// - /// - /// See Implementation of database providers and extensions - /// and How EF Core queries work for more information. /// public abstract class ShapedQueryCompilingExpressionVisitor : ExpressionVisitor { diff --git a/src/EFCore/Query/ShapedQueryCompilingExpressionVisitorDependencies.cs b/src/EFCore/Query/ShapedQueryCompilingExpressionVisitorDependencies.cs index fb697677ed0..5591cc49ddf 100644 --- a/src/EFCore/Query/ShapedQueryCompilingExpressionVisitorDependencies.cs +++ b/src/EFCore/Query/ShapedQueryCompilingExpressionVisitorDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Query /// 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 @@ -31,28 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Query /// instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record ShapedQueryCompilingExpressionVisitorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ShapedQueryCompilingExpressionVisitorDependencies( IEntityMaterializerSource entityMaterializerSource, diff --git a/src/EFCore/QueryTrackingBehavior.cs b/src/EFCore/QueryTrackingBehavior.cs index 7b532835182..321808c9c20 100644 --- a/src/EFCore/QueryTrackingBehavior.cs +++ b/src/EFCore/QueryTrackingBehavior.cs @@ -21,11 +21,11 @@ public enum QueryTrackingBehavior TrackAll = 0, /// - /// - /// The change tracker will not track any of the entities that are returned from a LINQ query. If the - /// entity instances are modified, this will not be detected by the change tracker and - /// will not persist those changes to the database. - /// + /// The change tracker will not track any of the entities that are returned from a LINQ query. If the + /// entity instances are modified, this will not be detected by the change tracker and + /// will not persist those changes to the database. + /// + /// /// /// Disabling change tracking is useful for read-only scenarios because it avoids the overhead of setting /// up change tracking for each entity instance. You should not disable change tracking if you want to @@ -36,15 +36,15 @@ public enum QueryTrackingBehavior /// Identity resolution will not be performed. If an entity with a given key is in different result in the result set /// then they will be different instances. /// - /// + /// NoTracking, /// - /// - /// The change tracker will not track any of the entities that are returned from a LINQ query. If the - /// entity instances are modified, this will not be detected by the change tracker and - /// will not persist those changes to the database. - /// + /// The change tracker will not track any of the entities that are returned from a LINQ query. If the + /// entity instances are modified, this will not be detected by the change tracker and + /// will not persist those changes to the database. + /// + /// /// /// Disabling change tracking is useful for read-only scenarios because it avoids the overhead of setting /// up change tracking for each entity instance. You should not disable change tracking if you want to @@ -55,7 +55,7 @@ public enum QueryTrackingBehavior /// Identity resolution will be performed to ensure that all occurrences of an entity with a given key /// in the result set are represented by the same entity instance. /// - /// + /// NoTrackingWithIdentityResolution } } diff --git a/src/EFCore/Storage/Database.cs b/src/EFCore/Storage/Database.cs index cec1aa93fae..9d05469e9f5 100644 --- a/src/EFCore/Storage/Database.cs +++ b/src/EFCore/Storage/Database.cs @@ -21,16 +21,18 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public abstract class Database : IDatabase { diff --git a/src/EFCore/Storage/DatabaseDependencies.cs b/src/EFCore/Storage/DatabaseDependencies.cs index 3bee5979f66..4723273fc75 100644 --- a/src/EFCore/Storage/DatabaseDependencies.cs +++ b/src/EFCore/Storage/DatabaseDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -31,28 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record DatabaseDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public DatabaseDependencies( IQueryCompilationContextFactory queryCompilationContextFactory, diff --git a/src/EFCore/Storage/DatabaseProvider.cs b/src/EFCore/Storage/DatabaseProvider.cs index 14590daa6b4..51a24f4bc90 100644 --- a/src/EFCore/Storage/DatabaseProvider.cs +++ b/src/EFCore/Storage/DatabaseProvider.cs @@ -17,15 +17,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// /// /// The type of options that the database provider will add to diff --git a/src/EFCore/Storage/DatabaseProviderDependencies.cs b/src/EFCore/Storage/DatabaseProviderDependencies.cs index 5bdae2c312b..03fc75bc555 100644 --- a/src/EFCore/Storage/DatabaseProviderDependencies.cs +++ b/src/EFCore/Storage/DatabaseProviderDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -28,28 +30,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record DatabaseProviderDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public DatabaseProviderDependencies() { diff --git a/src/EFCore/Storage/ExecutionStrategyDependencies.cs b/src/EFCore/Storage/ExecutionStrategyDependencies.cs index 62a041cc261..94a2d2da68a 100644 --- a/src/EFCore/Storage/ExecutionStrategyDependencies.cs +++ b/src/EFCore/Storage/ExecutionStrategyDependencies.cs @@ -16,6 +16,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -30,28 +32,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record ExecutionStrategyDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ExecutionStrategyDependencies( ICurrentDbContext currentContext, diff --git a/src/EFCore/Storage/IDatabase.cs b/src/EFCore/Storage/IDatabase.cs index 2d03c730901..8600485bd00 100644 --- a/src/EFCore/Storage/IDatabase.cs +++ b/src/EFCore/Storage/IDatabase.cs @@ -20,16 +20,18 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This interface is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IDatabase { diff --git a/src/EFCore/Storage/IDatabaseCreator.cs b/src/EFCore/Storage/IDatabaseCreator.cs index 3c7ce2c0290..fdf43900491 100644 --- a/src/EFCore/Storage/IDatabaseCreator.cs +++ b/src/EFCore/Storage/IDatabaseCreator.cs @@ -75,26 +75,22 @@ public interface IDatabaseCreator Task EnsureCreatedAsync(CancellationToken cancellationToken = default); /// - /// - /// Determines whether or not the database is available and can be connected to. - /// - /// - /// Note that being able to connect to the database does not mean that it is - /// up-to-date with regard to schema creation, etc. - /// + /// Determines whether or not the database is available and can be connected to. /// + /// + /// Note that being able to connect to the database does not mean that it is + /// up-to-date with regard to schema creation, etc. + /// /// if the database is available; otherwise. bool CanConnect(); /// - /// - /// Determines whether or not the database is available and can be connected to. - /// - /// - /// Note that being able to connect to the database does not mean that it is - /// up-to-date with regard to schema creation, etc. - /// + /// Determines whether or not the database is available and can be connected to. /// + /// + /// Note that being able to connect to the database does not mean that it is + /// up-to-date with regard to schema creation, etc. + /// /// A to observe while waiting for the task to complete. /// if the database is available; otherwise. /// If the is canceled. diff --git a/src/EFCore/Storage/IDatabaseFacadeDependencies.cs b/src/EFCore/Storage/IDatabaseFacadeDependencies.cs index c78c3bc23a5..ed370e34411 100644 --- a/src/EFCore/Storage/IDatabaseFacadeDependencies.cs +++ b/src/EFCore/Storage/IDatabaseFacadeDependencies.cs @@ -16,16 +16,18 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IDatabaseFacadeDependencies { diff --git a/src/EFCore/Storage/IDatabaseProvider.cs b/src/EFCore/Storage/IDatabaseProvider.cs index c4780dc9b66..c1c40c63fbf 100644 --- a/src/EFCore/Storage/IDatabaseProvider.cs +++ b/src/EFCore/Storage/IDatabaseProvider.cs @@ -16,15 +16,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IDatabaseProvider { diff --git a/src/EFCore/Storage/IDbContextTransaction.cs b/src/EFCore/Storage/IDbContextTransaction.cs index a50eca1d016..7efb3e3d922 100644 --- a/src/EFCore/Storage/IDbContextTransaction.cs +++ b/src/EFCore/Storage/IDbContextTransaction.cs @@ -10,16 +10,16 @@ namespace Microsoft.EntityFrameworkCore.Storage { /// - /// - /// A transaction against the database. - /// + /// A transaction against the database. + /// + /// /// /// Instances of this class are typically obtained from and it is not designed /// to be directly constructed in your application code. /// - /// - /// - /// See Transactions in EF Core for more information. + /// + /// See Transactions in EF Core for more information. + /// /// public interface IDbContextTransaction : IDisposable, IAsyncDisposable { @@ -120,17 +120,17 @@ Task RollbackToSavepointAsync(string name, CancellationToken cancellationToken = => throw new NotSupportedException(CoreStrings.SavepointsNotSupported); /// - /// - /// Destroys a savepoint previously defined in the current transaction. This allows the system to - /// reclaim some resources before the transaction ends. - /// + /// Destroys a savepoint previously defined in the current transaction. This allows the system to + /// reclaim some resources before the transaction ends. + /// + /// /// /// If savepoint release isn't supported, and should /// do nothing rather than throw. This is the default behavior. /// - /// - /// - /// See Transactions in EF Core for more information. + /// + /// See Transactions in EF Core for more information. + /// /// /// The name of the savepoint to release. void ReleaseSavepoint(string name) @@ -138,17 +138,17 @@ void ReleaseSavepoint(string name) } /// - /// - /// Destroys a savepoint previously defined in the current transaction. This allows the system to - /// reclaim some resources before the transaction ends. - /// + /// Destroys a savepoint previously defined in the current transaction. This allows the system to + /// reclaim some resources before the transaction ends. + /// + /// /// /// If savepoint release isn't supported, and should /// do nothing rather than throw. This is the default behavior. /// - /// - /// - /// See Transactions in EF Core for more information. + /// + /// See Transactions in EF Core for more information. + /// /// /// The name of the savepoint to release. /// A to observe while waiting for the task to complete. diff --git a/src/EFCore/Storage/IDbContextTransactionManager.cs b/src/EFCore/Storage/IDbContextTransactionManager.cs index 24c56fd4221..facdba02947 100644 --- a/src/EFCore/Storage/IDbContextTransactionManager.cs +++ b/src/EFCore/Storage/IDbContextTransactionManager.cs @@ -17,16 +17,18 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This interface is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// and Transactions in EF Core for more information. + /// + /// See Implementation of database providers and extensions + /// and Transactions in EF Core for more information. + /// /// public interface IDbContextTransactionManager : IResettableService { diff --git a/src/EFCore/Storage/IExecutionStrategy.cs b/src/EFCore/Storage/IExecutionStrategy.cs index 9872e2cdfe1..1813a6be995 100644 --- a/src/EFCore/Storage/IExecutionStrategy.cs +++ b/src/EFCore/Storage/IExecutionStrategy.cs @@ -9,19 +9,20 @@ namespace Microsoft.EntityFrameworkCore.Storage { /// - /// - /// A strategy that is used to execute a command or query against the database, possibly with logic to retry when a failure occurs. - /// + /// A strategy that is used to execute a command or query against the database, possibly with logic to retry when a + /// failure occurs. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Connection resiliency and database retries - /// for more information. + /// + /// See Connection resiliency and database retries + /// for more information. + /// /// public interface IExecutionStrategy { diff --git a/src/EFCore/Storage/IExecutionStrategyFactory.cs b/src/EFCore/Storage/IExecutionStrategyFactory.cs index 9bc4819470e..7ec0bb626f4 100644 --- a/src/EFCore/Storage/IExecutionStrategyFactory.cs +++ b/src/EFCore/Storage/IExecutionStrategyFactory.cs @@ -6,19 +6,19 @@ namespace Microsoft.EntityFrameworkCore.Storage { /// - /// - /// Factory for instances. - /// + /// Factory for instances. + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Connection resiliency and database retries - /// for more information. + /// + /// See Connection resiliency and database retries + /// for more information. + /// /// public interface IExecutionStrategyFactory { diff --git a/src/EFCore/Storage/ITypeMappingSource.cs b/src/EFCore/Storage/ITypeMappingSource.cs index 5197bf97544..59881a94993 100644 --- a/src/EFCore/Storage/ITypeMappingSource.cs +++ b/src/EFCore/Storage/ITypeMappingSource.cs @@ -13,22 +13,24 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The core type mapping source. Type mappings describe how a provider maps CLR types/values to database types/values. /// /// - /// Warning: do not implement this interface directly. Instead, derive from - /// for non-relational providers, or 'RelationalTypeMappingSource' for relational providers. - /// - /// /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// /// + /// Warning: do not implement this interface directly. Instead, derive from + /// for non-relational providers, or 'RelationalTypeMappingSource' for relational providers. + /// + /// + /// + /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface ITypeMappingSource { @@ -40,42 +42,36 @@ public interface ITypeMappingSource CoreTypeMapping? FindMapping(IProperty property); /// - /// - /// Finds the type mapping for a given representing - /// a field or a property of a CLR type. - /// - /// - /// Note: Only call this method if there is no available, otherwise - /// call - /// + /// Finds the type mapping for a given representing + /// a field or a property of a CLR type. /// + /// + /// Note: Only call this method if there is no available, otherwise + /// call + /// /// The field or property. /// The type mapping, or if none was found. CoreTypeMapping? FindMapping(MemberInfo member); /// - /// - /// Finds the type mapping for a given . - /// - /// - /// Note: Only call this method if there is no - /// or available, otherwise call - /// or - /// + /// Finds the type mapping for a given . /// + /// + /// Note: Only call this method if there is no + /// or available, otherwise call + /// or + /// /// The CLR type. /// The type mapping, or if none was found. CoreTypeMapping? FindMapping(Type type); /// - /// - /// Finds the type mapping for a given , taking pre-convention configuration into the account. - /// - /// - /// Note: Only call this method if there is no , - /// otherwise call . - /// + /// Finds the type mapping for a given , taking pre-convention configuration into the account. /// + /// + /// Note: Only call this method if there is no , + /// otherwise call . + /// /// The CLR type. /// The model. /// The type mapping, or if none was found. diff --git a/src/EFCore/Storage/ITypeMappingSourcePlugin.cs b/src/EFCore/Storage/ITypeMappingSourcePlugin.cs index 9470af469e4..5570a6ffa6e 100644 --- a/src/EFCore/Storage/ITypeMappingSourcePlugin.cs +++ b/src/EFCore/Storage/ITypeMappingSourcePlugin.cs @@ -6,19 +6,19 @@ namespace Microsoft.EntityFrameworkCore.Storage { /// - /// - /// Represents a plugin type mapping source. - /// + /// Represents a plugin type mapping source. + /// + /// /// /// The service lifetime is and multiple registrations /// are allowed. This means a single instance of each service is used by many /// instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface ITypeMappingSourcePlugin { diff --git a/src/EFCore/Storage/Internal/DatabaseFacadeDependencies.cs b/src/EFCore/Storage/Internal/DatabaseFacadeDependencies.cs index bb50b2810bf..19f42ea5044 100644 --- a/src/EFCore/Storage/Internal/DatabaseFacadeDependencies.cs +++ b/src/EFCore/Storage/Internal/DatabaseFacadeDependencies.cs @@ -9,19 +9,17 @@ namespace Microsoft.EntityFrameworkCore.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 record DatabaseFacadeDependencies : IDatabaseFacadeDependencies { /// diff --git a/src/EFCore/Storage/Internal/ExecutionStrategyFactory.cs b/src/EFCore/Storage/Internal/ExecutionStrategyFactory.cs index fbe9c438b66..cba75856737 100644 --- a/src/EFCore/Storage/Internal/ExecutionStrategyFactory.cs +++ b/src/EFCore/Storage/Internal/ExecutionStrategyFactory.cs @@ -7,19 +7,17 @@ namespace Microsoft.EntityFrameworkCore.Storage.Internal { /// - /// - /// 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. - /// - /// - /// The service lifetime is . This means that each - /// 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. - /// + /// 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. /// + /// + /// The service lifetime is . This means that each + /// 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 class ExecutionStrategyFactory : IExecutionStrategyFactory { private readonly NonRetryingExecutionStrategy _instance; diff --git a/src/EFCore/Storage/TypeMappingSource.cs b/src/EFCore/Storage/TypeMappingSource.cs index 968283b7696..01f3a26ee91 100644 --- a/src/EFCore/Storage/TypeMappingSource.cs +++ b/src/EFCore/Storage/TypeMappingSource.cs @@ -20,15 +20,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public abstract class TypeMappingSource : TypeMappingSourceBase { @@ -88,68 +90,66 @@ protected TypeMappingSource(TypeMappingSourceDependencies dependencies) => _explicitMappings.GetOrAdd( (mappingInfo, providerClrType, customConverter), k => - { - var (info, providerType, converter) = k; - var mapping = providerType == null - || providerType == info.ClrType - ? FindMapping(info) - : null; + { + var (info, providerType, converter) = k; + var mapping = providerType == null + || providerType == info.ClrType + ? FindMapping(info) + : null; - if (mapping == null) + if (mapping == null) + { + var sourceType = info.ClrType; + if (sourceType != null) { - var sourceType = info.ClrType; - if (sourceType != null) + foreach (var converterInfo in Dependencies + .ValueConverterSelector + .Select(sourceType, providerType)) { - foreach (var converterInfo in Dependencies - .ValueConverterSelector - .Select(sourceType, providerType)) - { - var mappingInfoUsed = info.WithConverter(converterInfo); - mapping = FindMapping(mappingInfoUsed); + var mappingInfoUsed = info.WithConverter(converterInfo); + mapping = FindMapping(mappingInfoUsed); - if (mapping == null - && providerType != null) + if (mapping == null + && providerType != null) + { + foreach (var secondConverterInfo in Dependencies + .ValueConverterSelector + .Select(providerType)) { - foreach (var secondConverterInfo in Dependencies - .ValueConverterSelector - .Select(providerType)) - { - mapping = FindMapping(mappingInfoUsed.WithConverter(secondConverterInfo)); + mapping = FindMapping(mappingInfoUsed.WithConverter(secondConverterInfo)); - if (mapping != null) - { - mapping = mapping.Clone(secondConverterInfo.Create()); - break; - } + if (mapping != null) + { + mapping = mapping.Clone(secondConverterInfo.Create()); + break; } } + } - if (mapping != null) - { - mapping = mapping.Clone(converterInfo.Create()); - break; - } + if (mapping != null) + { + mapping = mapping.Clone(converterInfo.Create()); + break; } } } + } - if (mapping != null - && converter != null) - { - mapping = mapping.Clone(converter); - } + if (mapping != null + && converter != null) + { + mapping = mapping.Clone(converter); + } - return mapping; - }); + return mapping; + }); /// - /// - /// Finds the type mapping for a given . - /// - /// - /// Note: providers should typically not need to override this method. - /// + /// Finds the type mapping for a given . /// + /// + /// Note: providers should typically not need to override this method. + /// /// The property. /// The type mapping, or if none was found. public override CoreTypeMapping? FindMapping(IProperty property) @@ -159,9 +159,9 @@ protected TypeMappingSource(TypeMappingSourceDependencies dependencies) } /// - /// - /// Finds the type mapping for a given . - /// + /// Finds the type mapping for a given . + /// + /// /// /// Note: Only call this method if there is no /// or available, otherwise call @@ -170,21 +170,19 @@ protected TypeMappingSource(TypeMappingSourceDependencies dependencies) /// /// Note: providers should typically not need to override this method. /// - /// + /// /// The CLR type. /// The type mapping, or if none was found. public override CoreTypeMapping? FindMapping(Type type) => FindMappingWithConversion(new TypeMappingInfo(type), null); /// - /// - /// Finds the type mapping for a given , taking pre-convention configuration into the account. - /// - /// - /// Note: Only call this method if there is no , - /// otherwise call . - /// + /// Finds the type mapping for a given , taking pre-convention configuration into the account. /// + /// + /// Note: Only call this method if there is no , + /// otherwise call . + /// /// The CLR type. /// The model. /// The type mapping, or if none was found. @@ -215,10 +213,10 @@ protected TypeMappingSource(TypeMappingSourceDependencies dependencies) } /// - /// - /// Finds the type mapping for a given representing - /// a field or a property of a CLR type. - /// + /// Finds the type mapping for a given representing + /// a field or a property of a CLR type. + /// + /// /// /// Note: Only call this method if there is no available, otherwise /// call @@ -226,7 +224,7 @@ protected TypeMappingSource(TypeMappingSourceDependencies dependencies) /// /// Note: providers should typically not need to override this method. /// - /// + /// /// The field or property. /// The type mapping, or if none was found. public override CoreTypeMapping? FindMapping(MemberInfo member) diff --git a/src/EFCore/Storage/TypeMappingSourceBase.cs b/src/EFCore/Storage/TypeMappingSourceBase.cs index a64951d95de..cc33413205a 100644 --- a/src/EFCore/Storage/TypeMappingSourceBase.cs +++ b/src/EFCore/Storage/TypeMappingSourceBase.cs @@ -18,15 +18,17 @@ namespace Microsoft.EntityFrameworkCore.Storage /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public abstract class TypeMappingSourceBase : ITypeMappingSource { @@ -47,15 +49,13 @@ protected TypeMappingSourceBase(TypeMappingSourceDependencies dependencies) protected virtual TypeMappingSourceDependencies Dependencies { get; } /// - /// - /// Overridden by database providers to find a type mapping for the given info. - /// - /// - /// The mapping info is populated with as much information about the required type mapping as - /// is available. Use all the information necessary to create the best mapping. Return - /// if no mapping is available. - /// + /// Overridden by database providers to find a type mapping for the given info. /// + /// + /// The mapping info is populated with as much information about the required type mapping as + /// is available. Use all the information necessary to create the best mapping. Return + /// if no mapping is available. + /// /// The mapping info to use to create the mapping. /// The type mapping, or if none could be found. protected virtual CoreTypeMapping? FindMapping(in TypeMappingInfo mappingInfo) @@ -84,50 +84,44 @@ protected virtual void ValidateMapping( } /// - /// - /// Finds the type mapping for a given . - /// - /// - /// Note: providers should typically not need to override this method. - /// + /// Finds the type mapping for a given . /// + /// + /// Note: providers should typically not need to override this method. + /// /// The property. /// The type mapping, or if none was found. public abstract CoreTypeMapping? FindMapping(IProperty property); /// - /// - /// Finds the type mapping for a given . - /// - /// - /// Note: Only call this method if there is no - /// or available, otherwise call - /// or - /// + /// Finds the type mapping for a given . /// + /// + /// Note: Only call this method if there is no + /// or available, otherwise call + /// or + /// /// The CLR type. /// The type mapping, or if none was found. public abstract CoreTypeMapping? FindMapping(Type type); /// - /// - /// Finds the type mapping for a given , taking pre-convention configuration into the account. - /// - /// - /// Note: Only call this method if there is no , - /// otherwise call . - /// + /// Finds the type mapping for a given , taking pre-convention configuration into the account. /// + /// + /// Note: Only call this method if there is no , + /// otherwise call . + /// /// The CLR type. /// The model. /// The type mapping, or if none was found. public abstract CoreTypeMapping? FindMapping(Type type, IModel model); /// - /// - /// Finds the type mapping for a given representing - /// a field or a property of a CLR type. - /// + /// Finds the type mapping for a given representing + /// a field or a property of a CLR type. + /// + /// /// /// Note: Only call this method if there is no available, otherwise /// call @@ -135,7 +129,7 @@ protected virtual void ValidateMapping( /// /// Note: providers should typically not need to override this method. /// - /// + /// /// The field or property. /// The type mapping, or if none was found. public abstract CoreTypeMapping? FindMapping(MemberInfo member); diff --git a/src/EFCore/Storage/TypeMappingSourceDependencies.cs b/src/EFCore/Storage/TypeMappingSourceDependencies.cs index 26fd70324ef..f0d26b3e6aa 100644 --- a/src/EFCore/Storage/TypeMappingSourceDependencies.cs +++ b/src/EFCore/Storage/TypeMappingSourceDependencies.cs @@ -17,6 +17,8 @@ namespace Microsoft.EntityFrameworkCore.Storage /// 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 @@ -31,28 +33,23 @@ namespace Microsoft.EntityFrameworkCore.Storage /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record TypeMappingSourceDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public TypeMappingSourceDependencies( IValueConverterSelector valueConverterSelector, diff --git a/src/EFCore/Storage/ValueConversion/BoolToTwoValuesConverter.cs b/src/EFCore/Storage/ValueConversion/BoolToTwoValuesConverter.cs index 7c477433bb5..d2cabe6fcd2 100644 --- a/src/EFCore/Storage/ValueConversion/BoolToTwoValuesConverter.cs +++ b/src/EFCore/Storage/ValueConversion/BoolToTwoValuesConverter.cs @@ -15,16 +15,16 @@ namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion public class BoolToTwoValuesConverter : ValueConverter { /// + /// Creates a new instance of this converter that will convert a false + /// to one value and a to another. + /// + /// /// - /// Creates a new instance of this converter that will convert a false - /// to one value and a to another. + /// Use for converting a to zero/one. /// /// - /// Use for converting a to zero/one. + /// See EF Core value converters for more information. /// - /// - /// - /// See EF Core value converters for more information. /// /// The value to convert to for . /// The value to convert to for . diff --git a/src/EFCore/Storage/ValueConversion/DefaultValueConverterRegistryDependencies.cs b/src/EFCore/Storage/ValueConversion/DefaultValueConverterRegistryDependencies.cs index 8d4f05cdb87..00fcbec8f21 100644 --- a/src/EFCore/Storage/ValueConversion/DefaultValueConverterRegistryDependencies.cs +++ b/src/EFCore/Storage/ValueConversion/DefaultValueConverterRegistryDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion /// 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 @@ -28,13 +30,13 @@ namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record ValueConverterSelectorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// + /// Creates the service dependencies parameter object for a . + /// + /// /// /// Do not call this constructor directly from either provider or application code as it may change /// as new dependencies are added. Instead, use this type in your constructor so that an instance @@ -49,7 +51,7 @@ public sealed record ValueConverterSelectorDependencies /// 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. /// - /// + /// [EntityFrameworkInternal] public ValueConverterSelectorDependencies() { diff --git a/src/EFCore/Storage/ValueConversion/GuidToBytesConverter.cs b/src/EFCore/Storage/ValueConversion/GuidToBytesConverter.cs index 53eb952d0b4..bd42825ad43 100644 --- a/src/EFCore/Storage/ValueConversion/GuidToBytesConverter.cs +++ b/src/EFCore/Storage/ValueConversion/GuidToBytesConverter.cs @@ -18,17 +18,17 @@ private static readonly ConverterMappingHints _defaultHints = new(size: 16, valueGeneratorFactory: (p, t) => new SequentialGuidValueGenerator()); /// - /// - /// Creates a new instance of this converter. - /// + /// Creates a new instance of this converter. + /// + /// /// /// This converter does not preserve order because the ordering of bits in /// the standard binary representation of a GUID does not match the ordering /// in the standard string representation. /// - /// - /// - /// See EF Core value converters for more information. + /// + /// See EF Core value converters for more information. + /// /// public GuidToBytesConverter() : this(null) @@ -36,17 +36,17 @@ public GuidToBytesConverter() } /// - /// - /// Creates a new instance of this converter. - /// + /// Creates a new instance of this converter. + /// + /// /// /// This converter does not preserve order because the ordering of bits in /// the standard binary representation of a GUID does not match the ordering /// in the standard string representation. /// - /// - /// - /// See EF Core value converters for more information. + /// + /// See EF Core value converters for more information. + /// /// /// /// Hints that can be used by the to create data types with appropriate diff --git a/src/EFCore/Storage/ValueConversion/IValueConverterSelector.cs b/src/EFCore/Storage/ValueConversion/IValueConverterSelector.cs index f8bd96c4763..8ec66aeda1c 100644 --- a/src/EFCore/Storage/ValueConversion/IValueConverterSelector.cs +++ b/src/EFCore/Storage/ValueConversion/IValueConverterSelector.cs @@ -8,19 +8,19 @@ namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { /// - /// - /// A registry of that can be used to find - /// the preferred converter to use to convert to and from a given model type - /// to a type that the database provider supports. - /// + /// A registry of that can be used to find + /// the preferred converter to use to convert to and from a given model type + /// to a type that the database provider supports. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See EF Core value converters for more information. + /// + /// See EF Core value converters for more information. + /// /// public interface IValueConverterSelector { diff --git a/src/EFCore/Storage/ValueConversion/NumberToBytesConverter.cs b/src/EFCore/Storage/ValueConversion/NumberToBytesConverter.cs index cc1186cbe14..a05c2acde34 100644 --- a/src/EFCore/Storage/ValueConversion/NumberToBytesConverter.cs +++ b/src/EFCore/Storage/ValueConversion/NumberToBytesConverter.cs @@ -19,18 +19,18 @@ public class NumberToBytesConverter : ValueConverter private static readonly ConverterMappingHints _defaultHints = new(size: GetByteCount()); /// - /// - /// Creates a new instance of this converter. - /// + /// Creates a new instance of this converter. + /// + /// /// /// This converter supports , , , /// , , , , /// , , , , /// and . /// - /// - /// - /// See EF Core value converters for more information. + /// + /// See EF Core value converters for more information. + /// /// public NumberToBytesConverter() : this(null) @@ -38,18 +38,18 @@ public NumberToBytesConverter() } /// - /// - /// Creates a new instance of this converter. - /// + /// Creates a new instance of this converter. + /// + /// /// /// This converter supports , , , /// , , , , /// , , , , /// and . /// - /// - /// - /// See EF Core value converters for more information. + /// + /// See EF Core value converters for more information. + /// /// /// /// Hints that can be used by the to create data types with appropriate diff --git a/src/EFCore/Storage/ValueConversion/ValueConverter.cs b/src/EFCore/Storage/ValueConversion/ValueConverter.cs index 553b26f9dd1..f151d201c57 100644 --- a/src/EFCore/Storage/ValueConversion/ValueConverter.cs +++ b/src/EFCore/Storage/ValueConversion/ValueConverter.cs @@ -159,17 +159,17 @@ protected ValueConverter( public virtual ConverterMappingHints? MappingHints { get; } /// - /// - /// If , then the nulls will be passed to the converter for conversion. Otherwise null - /// values always remain null. - /// + /// If , then the nulls will be passed to the converter for conversion. Otherwise null + /// values always remain null. + /// + /// /// /// By default, value converters do not handle nulls so that a value converter for a non-nullable property (such as /// a primary key) can be used for correlated nullable properties, such as any corresponding foreign key properties. /// - /// - /// - /// See EF Core value converters for more information. + /// + /// See EF Core value converters for more information. + /// /// public virtual bool ConvertsNulls { get; } diff --git a/src/EFCore/Storage/ValueConversion/ValueConverterSelector.cs b/src/EFCore/Storage/ValueConversion/ValueConverterSelector.cs index 9503c9263b9..1631edcd86a 100644 --- a/src/EFCore/Storage/ValueConversion/ValueConverterSelector.cs +++ b/src/EFCore/Storage/ValueConversion/ValueConverterSelector.cs @@ -14,19 +14,19 @@ namespace Microsoft.EntityFrameworkCore.Storage.ValueConversion { /// - /// - /// A registry of instances that can be used to find - /// the preferred converter to use to convert to and from a given model type - /// to a type that the database provider supports. - /// + /// A registry of instances that can be used to find + /// the preferred converter to use to convert to and from a given model type + /// to a type that the database provider supports. + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See EF Core value converters for more information. + /// + /// See EF Core value converters for more information. + /// /// public class ValueConverterSelector : IValueConverterSelector { @@ -400,19 +400,19 @@ private IEnumerable EnumToStringOrBytes( yield return _converters.GetOrAdd( (underlyingModelType, typeof(byte[])), k => - { - var toNumber = GetDefaultValueConverterInfo( - typeof(EnumToNumberConverter<,>).MakeGenericType(k.ModelClrType, k.ModelClrType.GetEnumUnderlyingType())); + { + var toNumber = GetDefaultValueConverterInfo( + typeof(EnumToNumberConverter<,>).MakeGenericType(k.ModelClrType, k.ModelClrType.GetEnumUnderlyingType())); - var toBytes = GetDefaultValueConverterInfo( - typeof(NumberToBytesConverter<>).MakeGenericType(k.ModelClrType.GetEnumUnderlyingType())); + var toBytes = GetDefaultValueConverterInfo( + typeof(NumberToBytesConverter<>).MakeGenericType(k.ModelClrType.GetEnumUnderlyingType())); - return new ValueConverterInfo( - underlyingModelType, - typeof(byte[]), - i => toNumber.Create().ComposeWith(toBytes.Create()), - toBytes.MappingHints); - }); + return new ValueConverterInfo( + underlyingModelType, + typeof(byte[]), + i => toNumber.Create().ComposeWith(toBytes.Create()), + toBytes.MappingHints); + }); } } diff --git a/src/EFCore/Update/IUpdateAdapter.cs b/src/EFCore/Update/IUpdateAdapter.cs index 57c01e65b3b..8ba9afc86c4 100644 --- a/src/EFCore/Update/IUpdateAdapter.cs +++ b/src/EFCore/Update/IUpdateAdapter.cs @@ -25,32 +25,28 @@ namespace Microsoft.EntityFrameworkCore.Update public interface IUpdateAdapter { /// - /// - /// Gets or sets a value indicating when a dependent/child entity will have its state - /// set to once severed from a parent/principal entity - /// through either a navigation or foreign key property being set to null. The default - /// value is . - /// - /// - /// Dependent/child entities are only deleted automatically when the relationship - /// is configured with . This is set by default - /// for required relationships. - /// + /// Gets or sets a value indicating when a dependent/child entity will have its state + /// set to once severed from a parent/principal entity + /// through either a navigation or foreign key property being set to null. The default + /// value is . /// + /// + /// Dependent/child entities are only deleted automatically when the relationship + /// is configured with . This is set by default + /// for required relationships. + /// CascadeTiming DeleteOrphansTiming { get; set; } /// - /// - /// Gets or sets a value indicating when a dependent/child entity will have its state - /// set to once its parent/principal entity has been marked - /// as . The default value is. - /// - /// - /// Dependent/child entities are only deleted automatically when the relationship - /// is configured with . This is set by default - /// for required relationships. - /// + /// Gets or sets a value indicating when a dependent/child entity will have its state + /// set to once its parent/principal entity has been marked + /// as . The default value is. /// + /// + /// Dependent/child entities are only deleted automatically when the relationship + /// is configured with . This is set by default + /// for required relationships. + /// CascadeTiming CascadeDeleteTiming { get; set; } /// @@ -88,11 +84,11 @@ public interface IUpdateAdapter void DetectChanges(); /// - /// - /// Forces immediate cascading deletion of child/dependent entities when they are either - /// severed from a required parent/principal entity, or the required parent/principal entity - /// is itself deleted. See . - /// + /// Forces immediate cascading deletion of child/dependent entities when they are either + /// severed from a required parent/principal entity, or the required parent/principal entity + /// is itself deleted. See . + /// + /// /// /// This method is usually used when and/or /// have been set to @@ -102,7 +98,7 @@ public interface IUpdateAdapter /// If is then this method /// will call . /// - /// + /// void CascadeChanges(); /// diff --git a/src/EFCore/Update/IUpdateAdapterFactory.cs b/src/EFCore/Update/IUpdateAdapterFactory.cs index aa8a5dbe281..fa91dd86084 100644 --- a/src/EFCore/Update/IUpdateAdapterFactory.cs +++ b/src/EFCore/Update/IUpdateAdapterFactory.cs @@ -28,16 +28,14 @@ public interface IUpdateAdapterFactory IUpdateAdapter Create(); /// - /// - /// Creates a standalone tracker that works with its own and hence will not - /// impact tracking on the state manager currently in use. - /// - /// - /// The from this update adapter should be used explicitly - /// once they have been setup. They will not be visible to other parts of the stack, - /// including . - /// + /// Creates a standalone tracker that works with its own and hence will not + /// impact tracking on the state manager currently in use. /// + /// + /// The from this update adapter should be used explicitly + /// once they have been setup. They will not be visible to other parts of the stack, + /// including . + /// /// The model for which a tracker is needed, or null to use the current model. /// The new tracker. IUpdateAdapter CreateStandalone(IModel? model = null); diff --git a/src/EFCore/Update/Internal/UpdateAdapter.cs b/src/EFCore/Update/Internal/UpdateAdapter.cs index d705d00665c..dc52dea693f 100644 --- a/src/EFCore/Update/Internal/UpdateAdapter.cs +++ b/src/EFCore/Update/Internal/UpdateAdapter.cs @@ -34,18 +34,16 @@ public UpdateAdapter(IStateManager stateManager) } /// - /// /// Gets or sets a value indicating when a dependent/child entity will have its state /// set to once severed from a parent/principal entity /// through either a navigation or foreign key property being set to null. The default /// value is . - /// - /// + /// + /// /// Dependent/child entities are only deleted automatically when the relationship /// is configured with . This is set by default /// for required relationships. - /// - /// + /// public virtual CascadeTiming DeleteOrphansTiming { get => _stateManager.DeleteOrphansTiming; @@ -53,17 +51,15 @@ public virtual CascadeTiming DeleteOrphansTiming } /// - /// /// Gets or sets a value indicating when a dependent/child entity will have its state /// set to once its parent/principal entity has been marked /// as . The default value is. - /// - /// + /// + /// /// Dependent/child entities are only deleted automatically when the relationship /// is configured with . This is set by default /// for required relationships. - /// - /// + /// public virtual CascadeTiming CascadeDeleteTiming { get => _stateManager.CascadeDeleteTiming; diff --git a/src/EFCore/ValueGeneration/HiLoValueGenerator.cs b/src/EFCore/ValueGeneration/HiLoValueGenerator.cs index a069079abeb..61716fccb72 100644 --- a/src/EFCore/ValueGeneration/HiLoValueGenerator.cs +++ b/src/EFCore/ValueGeneration/HiLoValueGenerator.cs @@ -10,18 +10,16 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration { /// - /// - /// Acts as a by requesting a block of values from the - /// underlying database and returning them one by one. Will ask the underlying - /// database for another block when the current block is exhausted. - /// - /// - /// A block is represented by a low value fetched from the database, and then a block size - /// that indicates how many sequential values can be used, starting from the low value, before - /// a new low value must be fetched from the database. - /// + /// Acts as a by requesting a block of values from the + /// underlying database and returning them one by one. Will ask the underlying + /// database for another block when the current block is exhausted. /// /// + /// A block is represented by a low value fetched from the database, and then a block size + /// that indicates how many sequential values can be used, starting from the low value, before + /// a new low value must be fetched from the database. + /// + /// /// See EF Core value generation for more information. /// /// The type of values that are generated. diff --git a/src/EFCore/ValueGeneration/IValueGeneratorCache.cs b/src/EFCore/ValueGeneration/IValueGeneratorCache.cs index d7bf8375959..aa52915cdaa 100644 --- a/src/EFCore/ValueGeneration/IValueGeneratorCache.cs +++ b/src/EFCore/ValueGeneration/IValueGeneratorCache.cs @@ -15,15 +15,17 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IValueGeneratorCache { diff --git a/src/EFCore/ValueGeneration/IValueGeneratorSelector.cs b/src/EFCore/ValueGeneration/IValueGeneratorSelector.cs index 32299bb1eca..7326f8da6b2 100644 --- a/src/EFCore/ValueGeneration/IValueGeneratorSelector.cs +++ b/src/EFCore/ValueGeneration/IValueGeneratorSelector.cs @@ -14,16 +14,18 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public interface IValueGeneratorSelector { diff --git a/src/EFCore/ValueGeneration/SequentialGuidValueGenerator.cs b/src/EFCore/ValueGeneration/SequentialGuidValueGenerator.cs index 99790743dfd..c9dc0f52dd6 100644 --- a/src/EFCore/ValueGeneration/SequentialGuidValueGenerator.cs +++ b/src/EFCore/ValueGeneration/SequentialGuidValueGenerator.cs @@ -8,11 +8,11 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration { /// - /// - /// Generates sequential values optimized for use in Microsoft SQL server clustered - /// keys or indexes, yielding better performance than random values. This is the default generator for - /// SQL Server columns which are set to be generated on add. - /// + /// Generates sequential values optimized for use in Microsoft SQL server clustered + /// keys or indexes, yielding better performance than random values. This is the default generator for + /// SQL Server columns which are set to be generated on add. + /// + /// /// /// See https://docs.microsoft.com/sql/t-sql/functions/newsequentialid-transact-sql. /// Although this generator achieves the same goals as SQL Server's NEWSEQUENTIALID, the algorithm used @@ -21,9 +21,9 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration /// /// The generated values are non-temporary, meaning they will be saved to the database. /// - /// - /// - /// See EF Core value generation for more information. + /// + /// See EF Core value generation for more information. + /// /// public class SequentialGuidValueGenerator : ValueGenerator { diff --git a/src/EFCore/ValueGeneration/TemporaryNumberValueGeneratorFactory.cs b/src/EFCore/ValueGeneration/TemporaryNumberValueGeneratorFactory.cs index a16b1ec4c1d..341c1e012b9 100644 --- a/src/EFCore/ValueGeneration/TemporaryNumberValueGeneratorFactory.cs +++ b/src/EFCore/ValueGeneration/TemporaryNumberValueGeneratorFactory.cs @@ -9,17 +9,15 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration { /// - /// - /// Factory for creation of temporary integer value generators appropriate - /// for the numeric type of the property. - /// - /// - /// Types supported are: , , , , - /// , , , , , - /// , , - /// + /// Factory for creation of temporary integer value generators appropriate + /// for the numeric type of the property. /// /// + /// Types supported are: , , , , + /// , , , , , + /// , , + /// + /// /// See EF Core value generation for more information. /// public class TemporaryNumberValueGeneratorFactory : ValueGeneratorFactory diff --git a/src/EFCore/ValueGeneration/ValueGenerator.cs b/src/EFCore/ValueGeneration/ValueGenerator.cs index b5536408239..cb88edf802f 100644 --- a/src/EFCore/ValueGeneration/ValueGenerator.cs +++ b/src/EFCore/ValueGeneration/ValueGenerator.cs @@ -68,20 +68,20 @@ public abstract class ValueGenerator => new(NextValue(entry)); /// - /// - /// Gets a value indicating whether the values generated are temporary (i.e they should be replaced - /// by database generated values when the entity is saved) or are permanent (i.e. the generated values - /// should be saved to the database). - /// + /// Gets a value indicating whether the values generated are temporary (i.e they should be replaced + /// by database generated values when the entity is saved) or are permanent (i.e. the generated values + /// should be saved to the database). + /// + /// /// /// An example of temporary value generation is generating negative numbers for an integer primary key /// that are then replaced by positive numbers generated by the database when the entity is saved. An /// example of permanent value generation are client-generated values for a primary /// key which are saved to the database. /// - /// - /// - /// See EF Core value generation for more information. + /// + /// See EF Core value generation for more information. + /// /// public abstract bool GeneratesTemporaryValues { get; } diff --git a/src/EFCore/ValueGeneration/ValueGeneratorCache.cs b/src/EFCore/ValueGeneration/ValueGeneratorCache.cs index 6e9536afcfc..cce60ed8383 100644 --- a/src/EFCore/ValueGeneration/ValueGeneratorCache.cs +++ b/src/EFCore/ValueGeneration/ValueGeneratorCache.cs @@ -17,15 +17,17 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class ValueGeneratorCache : IValueGeneratorCache { diff --git a/src/EFCore/ValueGeneration/ValueGeneratorCacheDependencies.cs b/src/EFCore/ValueGeneration/ValueGeneratorCacheDependencies.cs index 54497914365..1bf844ab38b 100644 --- a/src/EFCore/ValueGeneration/ValueGeneratorCacheDependencies.cs +++ b/src/EFCore/ValueGeneration/ValueGeneratorCacheDependencies.cs @@ -14,6 +14,8 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration /// 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 @@ -28,28 +30,23 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration /// The implementation must be thread-safe. /// This service cannot depend on services registered as . /// - /// + /// public sealed record ValueGeneratorCacheDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ValueGeneratorCacheDependencies() { diff --git a/src/EFCore/ValueGeneration/ValueGeneratorSelector.cs b/src/EFCore/ValueGeneration/ValueGeneratorSelector.cs index 999703cf50a..5464e0a69d7 100644 --- a/src/EFCore/ValueGeneration/ValueGeneratorSelector.cs +++ b/src/EFCore/ValueGeneration/ValueGeneratorSelector.cs @@ -18,16 +18,18 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration /// This type is typically used by database providers (and other extensions). It is generally /// not used in application code. /// + /// + /// /// /// The service lifetime is . This means that each /// 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. /// - /// - /// - /// See Implementation of database providers and extensions - /// for more information. + /// + /// See Implementation of database providers and extensions + /// for more information. + /// /// public class ValueGeneratorSelector : IValueGeneratorSelector { diff --git a/src/EFCore/ValueGeneration/ValueGeneratorSelectorDependencies.cs b/src/EFCore/ValueGeneration/ValueGeneratorSelectorDependencies.cs index 111bb077dfc..58d1736f54b 100644 --- a/src/EFCore/ValueGeneration/ValueGeneratorSelectorDependencies.cs +++ b/src/EFCore/ValueGeneration/ValueGeneratorSelectorDependencies.cs @@ -15,6 +15,8 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration /// 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 @@ -29,28 +31,23 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration /// The implementation may depend on other services registered with any lifetime. /// The implementation does not need to be thread-safe. /// - /// + /// public sealed record ValueGeneratorSelectorDependencies { /// - /// - /// Creates the service dependencies parameter object for a . - /// - /// - /// Do not call this constructor directly from either provider or application code as it 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. - /// - /// - /// 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. - /// + /// 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. /// + /// + /// Do not call this constructor directly from either provider or application code as it 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. + /// [EntityFrameworkInternal] public ValueGeneratorSelectorDependencies(IValueGeneratorCache cache) {