NuGet Packages
- Microsoft.EntityFrameworkCore.Design
- Shared design-time components for Entity Framework Core tools.
Package Manager Console
- Scaffold-DbContext
- Generates code for a DbContext and entity types for a database.
- In order for Scaffold-DbContext to generate an entity type, the database table must have a primary key.
- ConnectRetryCount
- The number of times the driver retries connection attempts to the primary database server, and if specified, alternate servers until a successful connection is established.
- This option and the Connection Retry Delay connection option, which specifies the wait interval between attempts, can be used in conjunction with failover.
- -Provider
- The provider to use.
- Typically this is the name of the NuGet package, for example: Microsoft.EntityFrameworkCore.SqlServer.
- This is a positional parameter and is required.
- -OutputDir
- The directory to put files in.
- Paths are relative to the project directory.
- -Context
- The name of the DbContext class to generate.
- -DataAnnotations
- Use attributes to configure the model (where possible). If this parameter is omitted, only the fluent API is used.