Skip to content

Instantly share code, notes, and snippets.

@germ13
Created November 7, 2023 18:46
Show Gist options
  • Save germ13/afd91eec03f2236af0347c43bb6812e5 to your computer and use it in GitHub Desktop.
Save germ13/afd91eec03f2236af0347c43bb6812e5 to your computer and use it in GitHub Desktop.
entity framework scaffolding
# scaffold database
dotnet ef dbcontext scaffold "Server=DESKTOP-2Q3OQ0V;Database=ProductionTracking;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -o Models -c ProductionTrackingContext --context-dir Contexts -f
# add Microsoft.EntityFrameworkCore.Design to project (data access project
dotnet add package Microsoft.EntityFrameworkCore.Design
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment