未验证 提交 1e348c1c 编写于 作者: A Adam Sitnik 提交者: GitHub

[docs] mention DI scenario in UseNpgsql fixes #2822 (#2823)

上级 1d6d8414
......@@ -130,8 +130,9 @@ public static class NpgsqlDbContextOptionsBuilderExtensions
/// <see cref="DbConnection" />, <see cref="DbDataSource" /> or connection string.
/// </para>
/// <para>
/// The connection, data source or connection string must be set before the <see cref="DbContext" /> is used to connect
/// to a database. Set a connection using <see cref="RelationalDatabaseFacadeExtensions.SetDbConnection" />, a data source using
/// The connection, data source or connection string must be set explicitly or registered in the DI
/// before the <see cref="DbContext" /> is used to connect to a database.
/// Set a connection using <see cref="RelationalDatabaseFacadeExtensions.SetDbConnection" />, a data source using
/// <see cref="NpgsqlDatabaseFacadeExtensions.SetDbDataSource" />, or a connection string using
/// <see cref="RelationalDatabaseFacadeExtensions.SetConnectionString" />.
/// </para>
......@@ -222,4 +223,4 @@ private static void ConfigureWarnings(DbContextOptionsBuilder optionsBuilder)
((IDbContextOptionsBuilderInfrastructure)optionsBuilder).AddOrUpdateExtension(coreOptionsExtension);
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册