sql server - Is there a way to store schema locally for F# SQL TypeProviders? -


i'm making use of fsharp.data.sqlclient sql type providers, , wanted know if there way store database schema locally.

for other type providers, json or yaml, you're able store sample locally type provider knows "shape" of incoming data. wanting same sql type provider.

yes, realize mean regenerating store locally each time there change in schema.

different providers have different capabilities. fsharp.data.sqlclient , sqlprovider cannot this. (formerly built-in) fsharp.data.typeproviders's sqldataconnection , sqlentityconnection can:

open fsharp.data.typeproviders  type mydb = sqldataconnection<connectionstring,                  localschemafile = "mydb.dbml",                 forceupdate = false> 

this save schema in file mydb.dbml, , subsequent compiles load there instead of connecting database. if need update file because schema has changed, set forceupdate true, recompile, set false. can commit dbml file , people able compile project without access database.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -