dotnet / EntityFramework.Docs

Documentation for Entity Framework Core and Entity Framework 6
https://docs.microsoft.com/ef/
Creative Commons Attribution 4.0 International
1.56k stars 1.94k forks source link

Update QueryTrackingBehavior benchmark as it fails due to attempts to insert nulls into not nullable db columns #4702

Open davepcallan opened 1 month ago

davepcallan commented 1 month ago

Without modification this benchmark fails as blog url and post title and content are not marked as nullable ? and we don't explicitly insert into these fields in the SeedData method so SQL Server rejects the insert.

Have amended SeedData to insert dummy data into blog.url, and post.title and post.content.

Alternative is to remove these fields or mark them as nullable but in the context of tracking v no-tracking, better to keep a more realistic scenario and just populate the fields IMHO.