How To

DateTime.Now vs DateTime.UtcNow
1/3/2025 1:54:35 AM  222

In this article, we explore the differences between DateTime.Now and DateTime.UtcNow in C#, focusing on time calculations and the significance of UTC.

How to convert a Unix timestamp to milliseconds in C#
1/3/2025 1:23:22 AM  225

In C#, to get the current Unix timestamp in milliseconds, you can use the following code:

How to Create an exception handler in ASP.NET Core 8
1/2/2025 9:55:51 AM  197

Microsoft’s .NET 8 release introduced the IExceptionHandler interface in ASP.NET Core 8, improving how exceptions are handled in web applications.

How to use primary constructors in C#
1/2/2025 9:35:06 AM  143

In C# 12, primary constructors are introduced for classes and structs in addition to record types.

How to use IEnumerable, ICollection, IList, and IQueryable in C#
1/2/2025 9:12:19 AM  355

C# provides robust support for working with collections of data through various classes and interfaces.

Choosing Between Classes, Structs, and Records in C#
1/2/2025 8:45:29 AM  183

In this post, we will learn how to use classes, structs, and record types in C#.

Object Services Layer in Entity Framework
1/2/2025 8:22:35 AM  73

To reduce the impedance mismatch between the object model and data model in an application, you can leverage the Object Services Layer in ADO.NET Entity Framework.

Understanding Virtual and Abstract Methods in C#
1/2/2025 8:09:29 AM  164

In C#, abstract methods and virtual methods both serve important roles, but they differ in their behavior and use cases.

Improving Entity Framework performance
1/2/2025 7:57:47 AM  51

The article discusses best practices for optimizing the performance of Entity Framework (EF), an ORM for ADO.NET.

Working with ActionResults in Web API
1/2/2025 7:37:02 AM  151

Action Results in ASP.Net Web API allow you to return data as an `HttpResponseMessage` object from controller methods, helping build stateless and RESTful HTTP services.

How to use symmetric and asymmetric encryption in C#
1/2/2025 7:27:51 AM  198

This article teaches how to secure data in .NET applications by encrypting and decrypting it using either a single key (symmetric encryption) or a public/private key pair (asymmetric encryption).

How to fix 'Chosen with bootstrap not working properly'
1/2/2025 6:53:54 AM  322

To fix an issue where Chosen (a jQuery plugin for enhancing <select> elements) is not working properly with Bootstrap, there are a few common problems and solutions to check.