Scaffold-DbContext to dotnet ef dbcontext scaffold convertion

517 Views Asked by At

I have a hard time finding the syntax for this in .NET EF world

Scaffold-DbContext "Server=server_dns,sql_port;Database=db-name; User ID=sql-account;Password=LeetPa$$w0rd;" -StartupProject Solution.Api Microsoft.EntityFrameworkCore.SqlServer -Context ApiDbContext -ContextDir "Data\Context" -OutputDir "..\Solution.Api.Data.Entities\CRL" -Namespace "Solution.Api.Data.Entities.CRL" -ContextNamespace "Solution.Api.Data.Context" -NoOnConfiguring -Force

This is what I got so far:

dotnet ef dbcontext scaffold "Server=server_dns,sql_port;Database=db-name; User ID=sql-account;Password=LeetPa$$w0rd;" -StartupProject Solution.Api Microsoft.EntityFrameworkCore.SqlServer --context ApiDbContext --context-dir "Data\Context" --output-dir "..\Solution.Api.Data.Entities\DBStuff" -Namespace "Solution.Api.Data.Entities.CRL" -ContextNamespace "Solution.Api.Data.Context" -NoOnConfiguring -Force

Failed on Unrecognized option '-StartupProject'

0

There are 0 best solutions below