Search code examples
f#type-providersf#-data

FSharp.Data: Use SqlDataProvider without database


I am using FSharp.Data SqlDataProvider (type provider) to access my data. Even though this is very nice way to get data into F# types it obviously requires having a database with correct schema in every development environment where I want to compile the code.

Is there any trick available to not require a database installation with correct schema during compile time? Like static schema file or conditional compilation? (In general the application would be able to execute without having a database installed)


Solution

  • Not having found any better idea I decided to create a SqlLite database file which I simply added so the source control system. This one is then referenced by the type provider at compile time. By that the correct schema us available in each development environment automatically.