Database-First workflow in Detail

by Sachin Singh

Posted on Saturday, 02 January 2021

Tags: Database-First approach in detail

In the last two articles we have discussed, the different workflows can be used to build domain models using Entity Framework. We have also discussed the advantages of a code-First workflow over a database-First workflow. In this section, we will discuss the database workflow in detail.

We will cover following topics
    • Features of EDMX designer for productivity : we will explore some useful features of EDMX designer which makes it very easy to work with large complex models.
    • Dealing with database changes : we will discuss how to deal with database changes in the most efficient way. As you add a new table to a database or delete or modify an existing one, you should know how to bring those changes back into your Entity Data Model so that your database and Entity Data Model are always in sync.
    • Connection string : here we will discuss , why does Entity Framework connection string contain meta properties and how does EF connect to database.
    • Import Stored Procedure and Functions : here we will discuss, how can we import stored procedures and Functions into our Entity Data Model and how to use them in our application.
    • working with Enums : here we will discuss, how to convert a data type to enum in our Entity Data Model and how to use Enums properly in the application.

So, let's get started with this section, I highly recommend you to go through the previous three articles before moving to the next articles.

The recommended articles are :
    • What is Entity Framework (Read here)
    • The different workflow's in EF (Read here) and
    • Comparison of Database-First approach and Code-First approach (Read here)

In most of the companies, there are different departments like BA department where Business Analysts analyze and prepare business requirement of clients for software, Software Department where actual Software engineers write code for the software, HR department where HR hires different employees for different posts in the company, UI department where people create a user interface for software and DB Department where a group of people including Database administrator designs database for the software, due to this structure most of the company develops software in modules in parallel, wherein one place people design the database and on another place, some writes the backend, so the web developer gets an existing database, that is the reason almost 70% companies follow database first approach although, from a developer's point of view, code First workflow is better.