Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrationBuilder.InsertData is not nullable compliant #24948

Closed
osjimenez opened this issue May 20, 2021 · 1 comment
Closed

migrationBuilder.InsertData is not nullable compliant #24948

osjimenez opened this issue May 20, 2021 · 1 comment

Comments

@osjimenez
Copy link

When I define seed data with HasData method the generated code for migration uses this syntax:

migrationBuilder.InsertData(
                schema: "dbo",
                table: "Table",
                columns: new[] { "Column1", "Column2" },
                values: new object[] { false, null });

If I defined enable in csproj, this code don't compile.
The problem is for values parameter, must be object?[] type instead of object[] type.

@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label May 20, 2021
@roji
Copy link
Member

roji commented May 20, 2021

Duplicate of #18950

@roji roji marked this as a duplicate of #18950 May 20, 2021
@roji roji added closed-duplicate and removed closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. labels May 20, 2021
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants