Extend GitHub Copilot in VS Code with Custom .NET Tools via MCP

Learn how to create a custom MCP (Model Context Protocol) server with .NET and integrate it into Visual Studio Code. Step-by-step guide with a simple code example. Introduction As GitHub Copilot and AI-powered agents become key components of modern development workflows, integrating custom logic into your IDE is more valuable than ever. Model Context Protocol … Sigue leyendo Extend GitHub Copilot in VS Code with Custom .NET Tools via MCP →

Sharing HTTP and Hangfire Context in a .NET 8 API

“In my latest projects working with Hangfire, I keep running into the issue of sharing the same HTTP context data between the API itself and any background jobs. Hangfire runs its own environment separate from HTTP requests, so I needed a strategy to unify these contexts.” In a previous blog post, I discussed configuring Hangfire’s … Sigue leyendo Sharing HTTP and Hangfire Context in a .NET 8 API →

Advanced Unit Testing in .NET with xUnit, NSubstitute, and AutoFixture: A Deep Dive into my HangfireDemoApi

Introduction In a previous article, "How to Configure Hangfire in a .NET 8 API with Secure Dashboard Access and Job Prioritization", we explored how to set up Hangfire in a .NET 8 API, focusing on secure dashboard access and job prioritization. Now, after spending the last few days deeply immersed in testing background jobs with … Sigue leyendo Advanced Unit Testing in .NET with xUnit, NSubstitute, and AutoFixture: A Deep Dive into my HangfireDemoApi →

How to Configure Hangfire in a .NET 8 API with Secure Dashboard Access and Job Prioritization

Introduction Hangfire is a powerful library that simplifies background job processing in .NET applications. It allows you to run tasks like sending emails, processing data, or performing scheduled tasks without blocking the main application thread. One of its most useful features is the Hangfire Dashboard, which offers an interface to monitor and control background jobs. … Sigue leyendo How to Configure Hangfire in a .NET 8 API with Secure Dashboard Access and Job Prioritization →

Setting Up OpenTelemetry my .NET API

In this post, I’ll walk you through setting up OpenTelemetry in a .NET API for monitoring and tracing, based on my experience with the HelloOpenTelemetry example. OpenTelemetry is a powerful observability framework for cloud-native software, providing standardized methods for collecting, processing, and exporting telemetry data such as traces, metrics, and logs. Additionally, we’ll cover how … Sigue leyendo Setting Up OpenTelemetry my .NET API →

Refit: Using API Calls in my latest projects

In the world of software development, we're always on the lookout for ways to optimize our code and enhance the efficiency of our projects. During the course of our latest projects, we made the decision to implement Refit to handle API calls. I had intended to write a detailed article about our experience with Refit, … Sigue leyendo Refit: Using API Calls in my latest projects →

How I Implemented Multiple Authentication in .NET WebAPI

Introduction Hey there! These past few days, I've had to add an additional authentication scheme to my API, and as usual, I had to roll up my sleeves and dive right in. You know how it goes: one day you're peacefully sipping coffee and programming easy stuffs, and the next, you're deep-diving into .NET authentication … Sigue leyendo How I Implemented Multiple Authentication in .NET WebAPI →

Proper Handling of File Uploads with ASP.NET Core and Swagger

When developing APIs with ASP.NET Core, handling file uploads is a common requirement. When combined with automatic API documentation provided by Swagger, some challenges may arise. In this article, we'll explore how to correctly configure your API to handle file uploads and ensure that Swagger documents it properly. Prerequisites Visual Studio 2022 or Visual Studio … Sigue leyendo Proper Handling of File Uploads with ASP.NET Core and Swagger →

Mastering Refit: A Comprehensive Guide to HTTP Client Generation in .NET

In the ever-evolving world of .NET development, efficient API communication is crucial. Today, I'm excited to share a game-changing approach I've recently implemented: using Refit to streamline the interaction between two REST APIs over HTTP/S. While the trusty HttpClient has long been a staple in our toolkit, Refit elevates API integration to new heights of … Sigue leyendo Mastering Refit: A Comprehensive Guide to HTTP Client Generation in .NET →

Image analysis with «Phi-3 Vision»

In this blog post, we'll explore how to leverage the new Phi-3 Vision model within a .NET application. I'll walk you through the entire process from downloading the model to writing and executing the code. Step 1: Download the Phi-3 Model To get started, we need to download the Phi-3 Vision model using the huggingface-cli … Sigue leyendo Image analysis with «Phi-3 Vision» →