fsprojects / SQLProvider

A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides.
https://fsprojects.github.io/SQLProvider
Other
572 stars 146 forks source link

Mappers not working anymore when using ContextSchemaPath #593

Closed tforkmann closed 5 years ago

tforkmann commented 5 years ago

Description

Trying to deploy my project to Azure DevOps. I ran into following issue: Once I used the ContextSchemaPath in Offline mode the mapping functions stop working. The dbRecords don't contain the Table elements any more.

Repro steps

  1. Define mappers like described here: https://github.com/fsprojects/SQLProvider/blob/master/docs/content/core/mappers.fsx

  2. Save ContextSchema

  3. Add ContextSchema path to the type definition like that type sql = SqlDataProvider<Common.DatabaseProviderTypes.SQLITE, connectionString, ResolutionPath = resolutionPath, CaseSensitivityChange = Common.CaseSensitivityChange.ORIGINAL, ContextSchemaPath = ContextSchemaPath>

  4. DbRecords are failing because table entitys are not containing the table elements Following Line would crash: https://github.com/fsprojects/SQLProvider/blob/master/docs/content/core/mappers.fsx#L39

Expected behavior

DbRecords should work also in Offline Mode.

Example

image

Any help would be appreciated!

Thorium commented 5 years ago

Closed already? What was the problem?

tforkmann commented 5 years ago

I created the issue two times by mistake