How To
Accessing Users from IdentityServer in .NET Core
By Tan Lee Published on Jan 10, 2025 290
If you ever find yourself needing to directly access the IdentityServer users database, you might notice that the API can feel somewhat awkward.
API Versioning in C# .NET Core
By Tan Lee Published on Jan 10, 2025 425
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 328
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 637
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 569
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 600
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 875
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 323
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 393
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 833
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 490
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 423
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.