Caching the connection reduces the setup time by avoiding the time to connect to the database (except for the first time).
高速缓存连接通过避免与数据库连接的时间(除了第一次)减少了设置时间。
DbContext is a simplified version of ObjectContext, providing basic functionality for model caching, database provisioning, connection management, and schema creation. An example looks as following.
DbContext是ObjectContext的简化版本,提供了基本的模型缓存、数据库供应、连接管理及模式创建等功能。
应用推荐