SQLProvider

OfflineTools Module

Types

Type Description

MockQueryable<'T>

Functions and values

Function or value Description

CreateMockEntities tableName dummydata

Full Usage: CreateMockEntities tableName dummydata

Parameters:
    tableName : string
    dummydata : obj

Returns: IQueryable<'T>

This can be used for testing. Creates de-attached entities.. Example: FSharp.Data.Sql.Common.OfflineTools.CreateMockEntities "MyTable1" [| {| MyColumn1 = "a"; MyColumn2 = 0 |} |]

tableName : string
dummydata : obj
Returns: IQueryable<'T>

CreateMockSqlDataContext dummydata

Full Usage: CreateMockSqlDataContext dummydata

Parameters:
    dummydata : Map<string, obj>

Returns: 'T

This can be used for testing. Creates fake DB-context entities.. Example: FSharp.Data.Sql.Common.OfflineTools.CreateMockSqlDataContext ["schema.MyTable1"; [| {| MyColumn1 = "a"; MyColumn2 = 0 |} |] :> obj] |> Map.ofList See project unit-test for more examples. NOTE: Case-sensitivity. Tables and columns are DB-names, not Linq-names. Limitation of mockContext: You cannot Create new entities to the mock context.

dummydata : Map<string, obj>
Returns: 'T

mergeCacheFiles (sourcefile1, sourcefile2, targetfile)

Full Usage: mergeCacheFiles (sourcefile1, sourcefile2, targetfile)

Parameters:
    sourcefile1 : string
    sourcefile2 : string
    targetfile : string

Returns: string

Merges two ContexSchemaPath offline schema files into one target schema file. This is a tool method that can be useful in multi-project solution using the same database with different tables.

sourcefile1 : string
sourcefile2 : string
targetfile : string
Returns: string

Type something to start searching.