How To
Two-Factor Authentication with Google Authenticator in ASP.NET Core
By Tan Lee Published on Feb 11, 2025 328
In this article, we’ll walk through the steps to implement two-factor authentication (2FA) in your ASP.NET Core web application using Time-Based One-Time Password (TOTP) apps like Google Authenticator and Authy.
Implementing Passkeys to ASP.NET Core Application
By Tan Lee Published on Feb 11, 2025 457
To implement Passkeys in an ASP.NET Core application, you'll need to follow a series of steps to integrate FIDO2 authentication into your application.
How to Implement Passkey Authentication in ASP.NET Core
By Tan Lee Published on Feb 11, 2025 365
In today’s digital world, securing user data while providing a seamless authentication experience is crucial. One of the most promising ways to achieve this is through Passkey authentication.
Implementing Google Authentication in the Blazor WebAssembly App
By Tan Lee Published on Feb 11, 2025 341
Easily integrate Google authentication into your Blazor WebAssembly app to enhance security. The process involves generating Google credentials, installing the Google authentication library, and configuring your app for smooth authentication.
How to sort by multiple fields in Linq
By Tan Lee Published on Feb 10, 2025 107
In LINQ (Language Integrated Query), you can sort by multiple fields using the OrderBy and ThenBy methods.
How to Select distinct objects based on a property in Linq
By Tan Lee Published on Feb 10, 2025 105
There are multiple ways to select distinct objects based on a property in LINQ.
Using yield return to minimize memory usage in C#
By Tan Lee Published on Feb 10, 2025 202
Imagine you are tasked with processing a large dataset, such as reading through a massive log file to identify specific errors and return relevant context objects for further analysis.
How to Add a custom InputFormatter in ASP.NET Core
By Tan Lee Published on Feb 10, 2025 301
How to implement a custom InputFormatter in ASP.NET Core that handles a non-standard content type, such as application/xml, to deserialize the request body into a MyModel object:
How to return a 500 response in ASP.NET Core
By Tan Lee Published on Feb 10, 2025 314
In ASP.NET Core, returning a 500 Internal Server Error response is straightforward. You can use the Problem() helper method, which is a part of the ControllerBase class, to return a standardized error response.
How to use data annotations in C#
By Tan Lee Published on Jan 06, 2025 518
Data annotations are attributes from the `System.ComponentModel.DataAnnotations` namespace that can be applied to classes or class members.
How to Remove Duplicates from a List with LINQ in C#
By Tan Lee Published on Jan 10, 2025 842
In C#, LINQ provides a simple way to remove duplicates from a list.
Using SqlBulkCopy to Insert a List of Objects in C#
By Tan Lee Published on Jan 09, 2025 644
The SqlBulkCopy class in C# offers an efficient way to insert large volumes of data into a SQL Server database.