Six ways to build Entity Framework (Core and EF6) applications

Based on requirement, we can design and develop better application using Entity Framework.

1) Separation of Concerns (SOC)

There is a software principal called Separation of Concerns (SoC), which says that you should:

A) Put code that has a similar, or strongly related functions should be grouped together [cohesion].

B) Make each group or projects as self-contained as possible. Each piece of code should have a clear interface and scope of work that is unlikely to change to because of other callers changing what they do [loosely coupling].

2) The Service Layer

We can set a boundary between two interfacing layers (separating data actions from presentation action).

3) Repositories

There are a number of different ways we can form EF database access inside an application, with different levels of hiding the EF access code from the rest of the application. The four types of database access patterns are:

A) Unit of Work
B) EF repository
C) Query Object
D) Direct calls to EF

4) Dependency injection – Turning your database code into services

5) Domain-Driven Design

6) Focusing on Performance

After the completed the development, we can focus on it. It includes

Vertically – what the user expects in terms of performance.
Horizontally – what the user expects how difficult is the database access.

Reference – https://lnkd.in/d8uWBa9M

Leave a Reply

Discover more from The Engineering Behind Enterprise AI

Subscribe now to keep reading and get access to the full archive.

Continue reading