Closed
Description
Description
The Create()
method does not contains the table primary key.
Repro steps
- Create table
CREATE TABLE unidadeDeMedida (
codigo INT PRIMARY KEY,
descricao NVARCHAR(250) NOT NULL
)
- Define type
type Db =
SqlDataProvider<Common.DatabaseProviderTypes.MYSQL,
DesignConnectionString,
ResolutionPath = ResolutionPath,
UseOptionTypes = true,
CaseSensitivityChange = CaseSensitivityChange.ORIGINAL>
- Try to access
Create(codigo, descricao)
let InserirUnidadesDeMedida connectionString unidadesDeMedida =
let ctx = Db.GetDataContext connectionString
unidadesDeMedida
|> Seq.map (fun x ->
ctx.Mdic.UnidadeDeMedida.``Create(codigo, descricao)``(x.Codigo, x.Descricao))
|> ignore
ctx.SubmitUpdates ()
Expected behavior
The Create(codigo, descricao) should exist.
Actual behavior
Compile error
FS0039: The field, constructor or member 'Create(codigo, descricao)' is not defined
Known workarounds
Do not use Create(...) method
Related information
- Used database: MariaDB 10.1.21
- Operating system: Fedora 25
- Branch: The one from Nuget (1.0.42)
- .NET Runtime, CoreCLR or Mono Version: Mono 4.6.2.16