How To

How to use a list of tuples in C#
3/19/2025 8:28:52 AM  232

In C#, a list of tuples can be used to store a collection of data where each element contains multiple values.

How to set time to 00:00:00 with GETDATE() in SQL
3/19/2025 8:26:05 AM  1.62K

In SQL Server, if you want to set the time part of the current date to 00:00:00 while using GETDATE(), you can use the CAST or CONVERT function to strip the time portion.

The name 'Session' does not exist in the current context
3/19/2025 8:19:34 AM  1.69K

In ASP.NET Core, the Session feature is not enabled by default and must be explicitly configured.

Implementing Two-Factor Authentication with Google Authenticator in ASP.NET Core
3/19/2025 8:18:53 AM  275

In this article, we'll explore how to implement two-factor authentication (2FA) in an ASP.NET Core web application using Time-Based One-Time Password (TOTP) apps, like Google Authenticator and Authy.

SQL Bulk Insert with SqlBulkCopy in C#
3/19/2025 8:08:17 AM  51

When dealing with a large number of records, especially in scenarios where inserting a lot of data into the database, a Bulk Insert can drastically improve performance over executing individual INSERT statements. Bulk Insertion can be up to 20x faster than inserting records one by one.

How to Use SqlDataReader to process multiple result sets in C#
3/19/2025 7:59:50 AM  26

In this article, I'll demonstrate how to use the SqlDataReader ADO.NET class in two scenarios involving multiple result sets:

How to use SqlBulkCopy in C#
3/19/2025 7:53:24 AM  468

SqlBulkCopy is a class in the System.Data.SqlClient namespace in C# that provides an efficient way to bulk load data into SQL Server databases.

How to Install and configure a Windows Service from the command line
3/19/2025 7:52:40 AM  29

This article explains how to install, configure, query, and uninstall a Windows Service using command line utilities installutil.exe and sc.exe.

How to Deserialize JSON that Contains an Embedded JSON String in C#
3/19/2025 7:41:13 AM  30

In this article, I'll demonstrate how to handle deserializing JSON that contains an embedded JSON string, which I'll refer to as a "JSON package." This concept is like receiving a gift box (the JSON package) that contains a smaller gift (the embedded JSON data) inside it.

SqlException: Cannot insert explicit value for identity column
3/19/2025 7:33:27 AM  19

This error occurs because the table contains an identity column, and you're attempting to manually set a value for it. With an identity column, the value is automatically generated by the system during the insert, which is why you're not allowed to provide a value for this column.

How to find all the dependencies of a table in SQL Server
3/14/2025 4:49:56 AM  137

When working with a database in SQL Server, understanding the dependencies between tables, views, procedures, and other objects is essential. Often, you might need to track how tables are interconnected, especially when trying to identify which other tables, views, or stored procedures depend on a particular table.

How to Find Objects Referencing a Table in SQL Server
3/14/2025 4:41:24 AM  78

Renaming a table in SQL Server can be a tricky task, especially when there are numerous objects such as columns, stored procedures, functions, or views that rely on that table.