Scaffolding with use-database-names and events table generates invalid code #31121
Labels
area-scaffolding
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Milestone
File a bug
I'm running this command
dotnet ef dbcontext scaffold --use-database-names --context-dir "Models" --output-dir "Models" -f "Name=ConnectionStrings:WebApiDatabase" Npgsql.EntityFrameworkCore.PostgreSQL
on a database that has an
events
table.This generates an
event.cs
model file. However theevent
file is generated with invalid syntax because of the reserved keyword.This also happens with a
files
table.Include provider and version information
EF Core version:
Database provider: Npgsql.EntityFrameworkCore.PostgreSQL 7.0.4
Target framework: .NET 7.0
Operating system: OSX
The text was updated successfully, but these errors were encountered: