Stop EF Core from using Merge to Insert
问题 I am converting my application to .NET Core. In doing so, I am running into issues with EF Core and inserts. If I insert 1 or 2 rows then EF Core performs a normal SQL INSERT statement. But when I have 3 or more rows, it switches to a MERGE statement, which then fails with: The column reference "inserted.MyKeyColumn" is not allowed because it refers to a base table that is not being modified in this statement. My guess is that this is due to the fact that the query is actually running on a