MVC 核心:DbContextOptions<T> 的含义是什么
MVC Core: What is meaning of DbContextOptions<T>
DbContextOptions<T>
的定义是什么?我没看懂,MSDN DbContextOptions<TContext>
The options to be used by a DbContext
. You normally override OnConfiguring(DbContextOptionsBuilder)
or use a DbContextOptionsBuilder<TContext>
to create instances of this class and it is not designed to be directly constructed in your application code.
我们是说,TContext
可用于为不同的数据库创建多个连接字符串吗?
每个实例甚至可以使用不同的提供商(e.b。SQLite 和 SQL 服务器)
DbContextOptions<T>
的定义是什么?我没看懂,MSDN DbContextOptions<TContext>
The options to be used by a
DbContext
. You normally overrideOnConfiguring(DbContextOptionsBuilder)
or use aDbContextOptionsBuilder<TContext>
to create instances of this class and it is not designed to be directly constructed in your application code.
我们是说,TContext
可用于为不同的数据库创建多个连接字符串吗?
每个实例甚至可以使用不同的提供商(e.b。SQLite 和 SQL 服务器)