How To
Applying Migrations Programmatically in EF Core
By Tan Lee Published on Feb 06, 2025 271
In EF Core, migrations are used to create the database, apply schema changes, and update tables.
Creating a Database and Table in EF Core
By Tan Lee Published on Feb 06, 2025 228
In Entity Framework (EF) Core, creating a database and a table involves a few steps.
Database Schema Modifications in EF Core
By Tan Lee Published on Feb 06, 2025 173
Whenever a database’s structure changes, whether you’re renaming a column or adding a new table, it’s called a database schema modification. With EF Core, these changes are managed through migrations.
Adding a Computed Column in EF Core
By Tan Lee Published on Feb 06, 2025 257
To add a computed column in EF Core, override DbContext.OnModelCreating() and use the ModelBuilder to define the computed column.
Inheritance Mapping in EF Core
By Tan Lee Published on Feb 06, 2025 208
In EF Core, inheritance can be mapped in two main ways:
Adding a Foreign Key in EF Core
By Tan Lee Published on Feb 06, 2025 360
In Entity Framework Core (EF Core), adding a foreign key involves creating a relationship between two entities (tables). You can define the foreign key either through data annotations in your model class or by using the Fluent API in your DbContext.
How to create a composite primary key in EF Core
By Tan Lee Published on Mar 07, 2025 187
A composite primary key is a primary key consisting of more than one column.
How to use GROUP BY in SQL
By Tan Lee Published on Mar 07, 2025 241
You can use the GROUP BY clause in SQL to organize rows based on one or more columns. This creates a single row per group in the result, where each group contains the columns used for grouping and the aggregated results of functions like COUNT, MIN, MAX, AVG, or SUM.
Filtering GROUP BY with HAVING and WHERE in SQL
By Tan Lee Published on Mar 07, 2025 284
In SQL, you can filter the results of a GROUP BY query in two ways:
Using GROUP BY with ORDER BY in SQL
By Tan Lee Published on Mar 07, 2025 336
The GROUP BY clause groups rows based on one or more columns, while the ORDER BY clause sorts rows. You can combine these two to sort the groups themselves.
How to change progress bar color in html
By Tan Lee Published on Mar 14, 2024 535
To change the color of a progress bar in HTML, you can use CSS.
Aggregate functions with GROUP BY in SQL
By Tan Lee Published on Mar 07, 2025 381
In SQL, there are five primary aggregate functions: COUNT(), SUM(), AVG(), MIN(), and MAX(). These functions calculate summary values for sets of rows. When used with the GROUP BY clause, they generate summary values for each group.