Skip to content

Commit

Permalink
BulkInsert is not working
Browse files Browse the repository at this point in the history
  • Loading branch information
virzak committed Feb 14, 2022
1 parent 9a9f3bd commit 182eb19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
<PackageReference Include="Z.EntityFramework.Extensions.EFCore" Version="6.13.9" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion OwnedEntityWithUniqueIndex/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
context.Entry(child).Reference(e => e.Owned).TargetEntry!.Property<Guid>(nameof(Child.ParentId))
.CurrentValue = child.ParentId;

context.SaveChanges();
context.BulkInsert(new[] { child });
}

0 comments on commit 182eb19

Please sign in to comment.