AK_*_*AK_ 6 .net f# type-providers
我正在使用Type Providers,特别是sql实体框架类型提供程序.我正在针对具有大量对象的数据库编写测试,并且它是远程的,因此连接速度有点慢.每次我构建项目都需要花费很多时间,构建完成需要几分钟.
我错过了什么编译器为什么不缓存类型信息?
PS F#interactive更糟糕......
Joh*_*ood 11
尝试将DataSchemaFile属性用于数据提供程序.这指向用于生成类型的.csdl文件.您可以让类型提供程序通过将ForceUpdate属性设置为true来更新此文件.要从缓存模式运行,只需将ForceUpdate设置为false.以下是我使用SqlDataConnection提供程序执行此操作的方法,该提供程序与SqlEntityConnection提供程序非常相似.
type schema = SqlDataConnection< LocalSchemaFile = "Schema.dbml", ForceUpdate = false, ConnectionString = @"Data Source=<insert your connection string here>" >
Run Code Online (Sandbox Code Playgroud)