Start Debugging

Tag: ef-core

89 posts · Page 1 of 9

What Decides Whether EF Core Scaffolds a SQL Server `date` Column as `DateOnly` or `DateTime`?
The EF Core version of the SQL Server provider in your startup project decides it: EF Core 7 and earlier scaffold date as DateTime, EF Core 8 through 11 scaffold it as DateOnly. Here is the type mapping that makes the call, measured output from EF Core 7, 8, 10, and 11 RC 2, and the two ways to get DateTime back without silently remapping the column to datetime2.
How to set PostgreSQL session parameters such as search_path or statement_timeout on every EF Core connection with Npgsql
A SET statement run once is wiped by DISCARD ALL the moment Npgsql returns the connection to its pool. Put search_path and statement_timeout in the startup packet with the Search Path and Options connection string keywords, fall back to ALTER ROLE or a ConnectionOpened interceptor, and know why UsePhysicalConnectionInitializer silently loses its SET.
Next