How To
API Versioning in C# .NET Core
By Tan Lee Published on Jan 10, 2025 267
In .NET Core, managing API versions is a critical aspect of maintaining backward compatibility and evolving your APIs without breaking existing clients.
Create a minimal API with ASP.NET Core
By Tan Lee Published on Jan 10, 2025 202
Ever wished you could skip all the boilerplate code that comes with controllers in your Web API?
Missing 'Access-Control-Allow-Origin' Header on Preflight Request
By Tan Lee Published on Jan 10, 2025 386
If you're encountering the following error when trying to call a CORS-protected .NET Core API endpoint from a browser:
Generate C# Class from SQL
By Tan Lee Published on Jan 10, 2025 366
I’m sure many developers share my frustration with “plumbing code” those tedious tasks that involve generating entity model classes that mirror SQL tables.
.NET Swagger API Versioning
By Tan Lee Published on Jan 10, 2025 392
When building APIs, versioning is an essential practice to ensure that your API evolves without breaking existing consumers.
Handling Serialization Issues in .NET Core
By Tan Lee Published on Jan 10, 2025 572
When developing APIs with .NET Core, proper exception handling is crucial to ensure your application responds with meaningful error messages.
Implementing Authorization in .NET Core APIs
By Tan Lee Published on Jan 10, 2025 210
When building APIs in .NET Core, not all endpoints need the same level of security or authorization.
How to convert a byte size to string in C#
By Tan Lee Published on Jan 10, 2025 269
When dealing with byte sizes in C#, you often need to present the size in a more understandable format, such as KB, MB, GB, or TB.
Removing Specific Query String Parameters from a URL in C#
By Tan Lee Published on Jan 10, 2025 554
In web development, it's often necessary to manipulate URLs, such as removing specific query string parameters.
Replace {x} tokens in strings in C#
By Tan Lee Published on Jan 10, 2025 321
When working with URLs that contain placeholders (also known as tokens), you may need to dynamically replace those placeholders with actual values at runtime.
String Token Replacer in C#
By Tan Lee Published on Jan 10, 2025 292
To create a string token replacer in C#, you can implement a simple method that searches for specific tokens (placeholders) in a string and replaces them with corresponding values from a dictionary.
Implementing .NET Core API Caching in C#
By Tan Lee Published on Jan 10, 2025 210
To implement caching in a .NET Core API using AddResponseCaching and the [ResponseCache] attribute, follow these steps.