filmov
tv
Entity Framework Code First - Migration Commands

Показать описание
It is very easy to convert your model classes to a physical database using Entity Framework Migration Tool.
1. Define your model classes
2. Open Package Manager Console
3. Enable the Migration using the (enable-migrations) command
4. Generate the migration script using the (add-migration [MigrationName]) command
5. Write the generated script to the SQL database using (update-database) and use the -verbose flag after this command to view the generated SQL query being written.
6. Done!
1. Define your model classes
2. Open Package Manager Console
3. Enable the Migration using the (enable-migrations) command
4. Generate the migration script using the (add-migration [MigrationName]) command
5. Write the generated script to the SQL database using (update-database) and use the -verbose flag after this command to view the generated SQL query being written.
6. Done!