- Mastering Entity Framework Core 2.0
- Prabhakaran Anbazhagan
- 138字
- 2021-07-02 21:16:40
Reverse engineering the database
Reverse engineering can be performed on the NuGet Package Manager console. We have already seen how to open it, so just execute the following command to scaffold the context and models files:
Scaffold-DbContext "Server
(localdb)\mssqllocaldb;Database=MasteringEFCoreDbFirst;
Trusted_Connection=True;"
Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
Sometimes we might get errors stating that The package could not be located. The workaround would be opening the project in a separate solution. If we get an Unable to open the database error, then providing access in the SQL Management Studio (connecting the locals from the studio) would resolve the issue. SQL Server Management Studio (SSMS) is a free version and can be downloaded from https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms.
Please refer to the following screenshot:

The scaffolding process generates database context files and corresponding data models (in our case, three files in total).
- DevOps:軟件架構師行動指南
- UML和模式應用(原書第3版)
- ASP.NET Core Essentials
- NativeScript for Angular Mobile Development
- Ray分布式機器學習:利用Ray進行大模型的數據處理、訓練、推理和部署
- 人人都懂設計模式:從生活中領悟設計模式(Python實現)
- Python數據可視化之Matplotlib與Pyecharts實戰
- Kotlin編程實戰:創建優雅、富于表現力和高性能的JVM與Android應用程序
- Creating Stunning Dashboards with QlikView
- Django 3.0入門與實踐
- Python自然語言理解:自然語言理解系統開發與應用實戰
- 軟件測試技術
- Mastering ArcGIS Server Development with JavaScript
- Mastering Python
- TensorFlow+Keras深度學習算法原理與編程實戰