For the full stack developers who work with .NET technology, entity framework is a magic! Using Entity Framework Core, developers can write the functioning and efficient business layer to connect to databases. Moreover, using different approaches from this Object-Relational Mapping, developers can easily make business layers automatically using just few commands.
2. INTR ODUC TION
o Object/Relational Mapping (O/RM)
framework
o It enables the .NET Developers to work with
the database by using objects.
o It removes the hassle of writing code to
access data from the data source by creating
a mechanism itself automatically.
3. DOMA IN D RIVE N DE SIGN
o Software Development approach which
focuses on understanding and modeling the
domain in which software operates
o Comprises set of patterns and principles
which helps developers to build complex
application aligned with real-world domains
4. EF C ORE APPR OACH ES
o There are two ways to work with
Entity Framework Core:
o Code First Approach
o Database First Approach
5. CODE FIR ST A PPRO ACH
o It focuses on the application’s domain and then creates the class only
for the domain.
o Code-First approach is mainly useful for Domain Driven Design
(DDD).
o Database is created automatically based on the created domain classes.
7. DATA BASE FIR ST
APPR OACH
o Unlike Code-first approach, you must initiate a database first with all
its relevant tables accordingly.
o Afterwards, you generate a code which creates the domain classes
based on that database.
8. DATA BASE FIR ST
APPR OACH
Console
commands for
migration
Configures/
Creates the
Domain
Classes
Data Source