You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use PostgreSQL and are in the process of migrating from .NET8 to .NET9 and in doing so, changing from the Legacy POCO mapping to the newer .ToJson() Mapping.
In the attached sample, there is no data actually being modified. In all cases, dbContext.ChangeTracker.HasChanges(); returns false.
.NET8, version 8.0.11
Legacy Poco Mapping: 0ms
.ToJson(): 300ms
.NET9, version 9.0.0
Legacy Poco Mapping: 0ms
.ToJson(): 2500ms
In both cases, .ToJson() takes longer; however, the difference between .NET8 and .NET9 is 10x more.
The sample references .NET9; however, can be changed to .NET8 for testing. It also relies on Docker for Testcontainers.PostgreSql