How To
How to Create Word Document in C#
2/7/2025 1:55:12 AM 161
Creating a Word document programmatically in C# can be achieved using the Microsoft.Office.Interop.Word library.
How to pass anonymous types as parameters in C#
2/6/2025 9:11:43 AM 389
In C#, you generally cannot pass anonymous types directly as parameters to methods because they do not have a named type that can be referenced outside their declaration scope.
EF Core - Adding a Foreign Key
2/6/2025 8:35:29 AM 48
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.
EF Core - Inheritance Mapping
2/6/2025 8:26:36 AM 46
In EF Core, inheritance can be mapped in two main ways:
EF Core - Applying Migrations Programmatically
2/6/2025 8:24:55 AM 44
In EF Core, migrations are used to create the database, apply schema changes, and update tables.
EF Core - Creating a Database and Table
2/6/2025 8:23:52 AM 30
In Entity Framework (EF) Core, creating a database and a table involves a few steps.
EF Core - Database Schema Modifications
2/6/2025 8:20:24 AM 34
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.
EF Core - Adding a Computed Column
2/6/2025 7:54:48 AM 41
To add a computed column in EF Core, override DbContext.OnModelCreating() and use the ModelBuilder to define the computed column.
EF Core - SELECT Queries Involving Multiple Tables
2/6/2025 7:48:45 AM 45
When you design a database with related tables, it’s common to need data from more than one table or filter records based on values from another table.
EF Core - Aggregate SELECT queries
2/6/2025 7:42:01 AM 27
In this article, I’ll demonstrate how to use EF Core to aggregate data from a table, group it by a specific category, and apply conditions to include only certain groups.
EF Core - Basic SELECT Queries
2/6/2025 7:31:28 AM 28
In this article, I’ll walk you through how to execute basic SELECT queries in EF Core, using both LINQ and raw SQL queries.
EF Core - Creating a Composite Primary Key
2/6/2025 7:30:34 AM 33
A composite primary key consists of two or more columns that together serve as the primary key for a table.