Publishing a NuGet package to nuget.org can be automated using GitHub Actions, which is a powerful tool for continuous integration and continuous deployment (CI/CD). This guide will walk you through the steps required to publish your NuGet package automatically every time you push a code update to a specific branch in your GitHub repository. Prerequisites … Continue reading GitHub Action to Publish to NuGet.Org
Category: General
“NuGet Why” Command: Understanding Dependency Graphs in .NET Projects
Introduction Managing dependencies in .NET projects can sometimes be a challenging task, especially when trying to understand how various packages interrelate in your solution. Enter the dotnet nuget why command—a powerful tool introduced in the .NET 8.0.4xx SDK and later versions. This command allows you to visualize and analyze the dependency graph for a specific … Continue reading “NuGet Why” Command: Understanding Dependency Graphs in .NET Projects
Why Should I Care About Functional Programming in C#?
Functional programming (FP) is a programming paradigm that emphasizes immutability, first-class functions, and expressions over statements. While C# is primarily an object-oriented language, it has incorporated many functional programming features over time, particularly since C# 3.0 and with further enhancements in later versions. Here's why you should care about functional programming when working with C#: … Continue reading Why Should I Care About Functional Programming in C#?
Creating a Fluent API in C#
Introduction Fluent API is a design pattern that provides more readable and intuitive code by chaining method calls together. This type of API is commonly used in implementing the Builder design pattern. This style enhances code readability, reduces boilerplate, and makes APIs easier to use. Fluent APIs are commonly seen in libraries like LINQ and … Continue reading Creating a Fluent API in C#
Configure Visual Studio to Use File-Scoped Namespaces on New Classes
Filed-scoped namespaces were a new feature added to C# 10. File-scoped namespaces simplify the organization of code by allowing you to declare the namespace at the file level rather than wrapping each type in its own namespace block. This can lead to more readable and concise code with one less layer of curly braces in … Continue reading Configure Visual Studio to Use File-Scoped Namespaces on New Classes
GitHub Enterprise included with Visual Studio Subscription
I learned today that the GitHub Enterprise license is included with your Visual Studio Subscription (previously MSDN subscription). This means that you can use the Enterprise features of GitHub when you tie your VS Subscription with it. Great news for people with that subscription, so you don't have to pay for both. Here is a … Continue reading GitHub Enterprise included with Visual Studio Subscription
Getting Started with Minimal WebAPI: Beginner’s Guide
Minimal WebAPIs offer a lightweight and streamlined approach to building web APIs in ASP.NET Core. In this beginner's guide, we will explore the fundamental concepts of Minimal WebAPI development using C#. We'll cover the basics of creating endpoints, handling requests, and returning responses. Prerequisites To follow along with this guide, you should have a basic … Continue reading Getting Started with Minimal WebAPI: Beginner’s Guide
Level up string manipulation with String Interpolation in C#
String manipulation is a fundamental aspect of software development, allowing us to create dynamic and expressive outputs. In C#, one powerful tool that enhances the readability and simplicity of string manipulation is string interpolation. Let's explore the benefits and usage of string interpolation in C#, and how it can improve your coding experience. What is … Continue reading Level up string manipulation with String Interpolation in C#
Use VS Code to Edit WebApi Projects
You can use Visual Studio Code (VS Code) as an editor for web API projects. VS Code is a lightweight, cross-platform code editor that provides a rich set of features and extensions for working with various programming languages, including C# and .NET. To work with ASP.NET Web API projects in VS Code, you need to … Continue reading Use VS Code to Edit WebApi Projects
RESTful Web APIs Book
I've been reading this book on the basics of RESTful API. It has a good description of the basics with a concentration on building hypermedia API. While that was an important part of the original REST definition, it seems to continue to be the least used and more misunderstood. But I recommend this book for … Continue reading RESTful Web APIs Book