dotnet ef scaffold sqlite 1

dotnet ef scaffold sqlite

dotnet ef dbcontext scaffold "data source=C:\dbPath\db.sqlite" Microsoft.EntityFrameworkCore.Sqlite --output-dir DataModel

Here is what the above code is Doing:
1. dotnet ef dbcontext scaffold is the command to scaffold a database
2. “data source=C:\dbPath\db.sqlite” is the connection string to the database
3. Microsoft.EntityFrameworkCore.Sqlite is the provider to use
4. –output-dir DataModel is the directory to output the generated files

Similar Posts