- Mastering Entity Framework Core 2.0
- Prabhakaran Anbazhagan
- 346字
- 2021-07-02 21:16:35
Kickstart - Introduction to Entity Framework Core
I still remember the days when we were spending quite a lot of time on working with relational databases rather than just focusing on solving business problems; those days are definitely gone. To elaborate, let's jot down the issues we had before ORM:
- Data access layers were not portable, which made it hard to change from one platform to another.
- There were no abstractions, which forced us to write manual mapping between objected-oriented objects and data entities.
- Vendor-specific SQL statements, which requires knowledge to port between different RDBMS systems.
- Relied heavily on triggers and stored procedures.
The entire product development process shifted towards tools and open source platforms, and even Microsoft took that path from .NET Core onward. If we keep spending time on writing code which could be achieved through tools, we might end up looking like cavemen.
The Entity Framework was created to address this concern; it was not introduced with the initial .NET framework but rather was introduced in .NET Framework 3.5 SP1.
If we look closely, it was obvious that the .NET team built it for the following reasons:
- To minimize the time spent by the developers/architects on stuff like abstractions and the portable data access layer
- So that the developers do not require vendor specific SQL knowledge
- So that we can build object-oriented business logic by eradicating triggers and SPs
This book uses Visual Studio 2017 (the latest at the time of writing) and ASP.NET Core 2.0 MVC with Entity Framework 2.0. Even though Entity Framework 2.0 is the latest version, it is still an evolving one, so it would take time for the .NET team to develop all the existing features of Entity Framework 6.2 based on the full .NET Framework.
We will cover the following topics here:
- Prerequisites
- Creating a new project
- Installing Entity Framework 2.0
- Data models
- Database context
- Registering the context in services (.Net Core DI)
- Creating and seeding databases
- Performing CRUD operations
- JBoss Weld CDI for Java Platform
- 營銷數據科學:用R和Python進行預測分析的建模技術
- PLC編程與調試技術(松下系列)
- jQuery開發基礎教程
- 零基礎學單片機C語言程序設計
- WordPress 4.0 Site Blueprints(Second Edition)
- Creating Mobile Apps with jQuery Mobile(Second Edition)
- Terraform:多云、混合云環境下實現基礎設施即代碼(第2版)
- Vue.js應用測試
- Kotlin極簡教程
- 區塊鏈國產化實踐指南:基于Fabric 2.0
- Windows Phone 8 Game Development
- SpringBoot從零開始學(視頻教學版)
- C++程序設計
- 深入淺出Python數據分析