How to do Code-First approach with Entity Framework Core and SQL LocalDB

If you have used Entity Framework, you have probably known that there are 3 possible approaches to work with the database:

  • Database First

Database First is the most common practice when working an existing database.

In this case, an .EDMX (Entity Data Model XML) file will be generated when you map the database in your project. And it contains all the data models.

  • Model First

With Model First approach, you start by creating .EDMX file with models in the designer, then you generate the database from the .EDMX file.

  • Code First

With Code First approach, you create the data models firstly, and then generate or update the database with incremental migrations.

You have refined control on the details of data models, like the column constraints(max/min length), relationships etc.

And with the migration history, you can easily move forward or rollback your database version while ensuring the data model consistency.

More …

What is the difference between ASMX, WCF, and ASP.NET Web API?

Application architecture has evolved from monolithic architecture to SOA architecture in order to make better separation, then to more refined microservice architecture today.

Applications need to communicate among themselves, and to achieve this purpose, Microsoft has developed technologies like ASMX, WCF, and ASP.NET Web API.

Let’s explore them together today.

More …

What is CLR profiler?

CLR Profiler is a .NET tool, developed by Microsoft, to evaluate the C# applications (.exe) performances.

More …

.NET Profiling tools

There are some .NET profiling tools which are quite helpful to make code benchmarks and guide you to fix the application’s performance problems.

More …