A good link to read about: https://blog-bertrand-thomas.devpro.fr/2019/10/24/api-authentication-with-asp-net-core-3-0-and-firebase/#comments
AI-Powered Refactoring: Fluent Assertions to xUnit in .NET
Big news in the .NET world: Fluent Assertions, that handy assertion library many of us love, isn’t completely free anymore. That means license fees for commercial use. Ouch! So, what’s a dev to do? I decided to jump ship to xUnit’s built-in assertions (which are free, and solid). But I had a ton of code to refactor. That’s where AI came to the rescue. I had done something similar before with NSubstituteConverter using Roslyn, but this time, I wanted to see if an LLM could handle the heavy lifting.
(The Challenge – No More Free Lunch)
The problem was simple: Fluent Assertions now costs money for commercial projects. I needed to:
Avoid those licensing fees.
Simplify my tooling (one less dependency to manage).
Keep my tests consistent (all using xUnit).
Manually changing every assertion? No way. That’s a recipe for bugs and wasted time.
(AI to the Rescue – How I Did It)
I built a system using some pretty cool tech:
Roslyn: Think of Roslyn as the .NET code whisperer. It understands C# code, not just the text. I used it to find every single Fluent Assertions statement in my project.
Semantic Kernel: This is like the conductor of my AI orchestra. It connects Roslyn to the LLM, handling all the communication.
Ollama: This let me run my AI model (Qwen2.5-coder:14b) locally on my machine. No sending code to the cloud! Privacy and cost savings? Yes, please!
Qwen2.5-coder:14b: This is the star of the show – the Large Language Model that actually did the refactoring. It’s surprisingly good at understanding code.
Basically, Roslyn finds the Fluent Assertions, Semantic Kernel tells Qwen what to do, and Qwen rewrites it as xUnit code.
(Qwen vs. Copilot – A Mini Showdown)
I pitted Qwen2.5-coder:14b against GitHub Copilot. Copilot is great for writing new code, but for replacing existing code, especially those tricky Should().Throw<>().WithMessage() statements, Qwen was the clear winner. It just seemed to “get” the subtle differences between the two assertion styles better.
(The Results – Did It Work?)
It worked really well! I automated a huge chunk of the refactoring, saving me tons of time. There were a few edge cases that needed a human touch, but overall, it was a massive success.
(Lessons Learned & What’s Next)
This project showed me the real power of AI for code refactoring. It’s not just about auto-completion anymore; it’s about transforming existing code. I am exploring below questions:
What other LLMs are good at this kind of task?
Could I use this approach for other refactoring jobs?
Is it interesting to opensource?
(Call to Action)
Thinking about ditching Fluent Assertions? Curious about AI-powered refactoring? I’m considering open-sourcing this tool – let me know in the comments if you’d find it useful! And share your own experiences with AI and code refactoring – I’d love to hear them!
[Written By Gemini] Building Open Source Agentic RAG with DeepSeek
This blog post summarizes a recent webinar on building open-source agentic RAG (Retrieval Augmented Generation) applications using DeepSeek and Quadrant. The webinar focused on the challenges and solutions for implementing RAG in enterprise environments, emphasizing data privacy and security.
What is Agentic RAG?
Agentic RAG combines the power of large language models (LLMs) with retrieval systems to provide more accurate and contextually relevant answers. Instead of just relying on the LLM’s internal knowledge, RAG retrieves relevant information from external data sources (like a vector database) and uses that context to generate a response. The “agentic” part refers to using the LLM itself to determine how to query and retrieve information, making the process more dynamic and intelligent.
Key Takeaways from the Webinar:
- Enterprise RAG Challenges: Building RAG for enterprises involves additional considerations beyond simple prototypes. Data privacy, regulatory compliance (like SO2), and access control become crucial.
- Open Source Advantage: Using open-source tools like DeepSeek and Quadrant offers greater control and transparency. It allows organizations to host models and data locally, addressing data sovereignty and privacy concerns.
- Hybrid Cloud Deployment: Quadrant’s hybrid cloud offering allows organizations to manage their Quadrant databases through a cloud platform while the databases themselves reside on their own infrastructure (e.g., AWS, Azure, on-premise). This combines the ease of use of a managed service with the security of local hosting.
- DeepSeek Integration: The webinar showcased how to integrate DeepSeek LLMs with Quadrant for building a practical RAG application. They demonstrated a contract and ticket management system for a fictional support company, highlighting role-based access control.
- ML Pipeline Optimization: The presenters discussed various aspects of optimizing the ML pipeline, including LLM selection (DeepSeek offers various models for different needs), embedding and chunking strategies, and Quadrant configuration. They emphasized the importance of choosing the right tools and configurations for specific use cases.
- Role-Based Access Control (RBAC): The demo showcased how Quadrant’s RBAC features can be used to control access to sensitive data at the database level. Different API keys can be granted varying levels of access to specific collections, ensuring data security.
Building the Application:
The webinar presenters demonstrated a Next.js application that used DeepSeek and Quadrant. They showed how to connect data to a Quadrant cluster, query the data using natural language, and implement role-based access control. The application allowed users to search through contracts and tickets, with different roles having access to different sets of data.
Why Quadrant?
Quadrant is a vector database designed for efficient storage and retrieval of vector embeddings. Its open-source nature, hybrid cloud capabilities, and focus on performance make it a strong choice for building enterprise-grade RAG applications. The webinar highlighted Quadrant’s speed, ease of use, and advanced features like metadata filtering.
Conclusion:
The webinar provided a valuable overview of building open-source agentic RAG applications with DeepSeek and Quadrant. It addressed the specific challenges of enterprise RAG, emphasizing data privacy, security, and access control. The hybrid cloud deployment model and the practical demo showcased the power and flexibility of these tools. For organizations looking to build secure and efficient RAG applications, DeepSeek and Quadrant offer a compelling solution.
Everything as a code in Azure devops
Howdy Readers,
Today I’m not going to write much than sharing a list of blog posts that I came across. It is a nice read if you are interested in Azure DevOps or Deployment pipelines in General. Credit to JEREMY LINDSAY for creating everything-as-code-with-azure-devops-pipelines series.
Part 1 : C#, ARM and YAML
Part 2 : Multi-stage builds in YAML
Part 3 : Resource groups and YAML templates
Part 4 : Deploying an ARM template to create an Azure App Service with code
Azure AD login for Linux VMs from a security perspective
Have your CAKE and eat it–implementing a C# build script at Huddle
Liam Westley - London developer
tldr; a build script should achieve several things; it can build and test your code locally, it can run (virtually unchanged) on a build server and it should be easy to understand for the developer of the application.
The Huddle Desktop application is written in C# for Windows and Mac. With CAKE we can finally have a single cross-platform build script, written in the language used to develop the actual application.
What Is CAKE?
Cake (C# Make) is a cross-platform build system using a C# DSL – built on top of the Roslyn compiler and available on Windows, Linux and macOS (https://cakebuild.net/). It is completely open source and hosted on GitHub.
You can get started by cloning an example repo, which is described over here; https://cakebuild.net/docs/tutorials/getting-started.
There are three key files – build.ps1 (PowerShell bootstrapper for Windows), build.sh (bash shell bootstrapper for Linux and macOS)…
View original post 1,134 more words
GDPR Support with ASP.NET Core 2.1
On May-25th, General Data Protection Regulation (GDPR) becomes active. With that many articles available on GDPR, I need to write one as well. However, this one is about ASP.NET Core. ASP.NET Core 2.1 includes built-in support to fulfill some GDPR requirements.
The ASP.NET Core 2.1 project template not only includes a privacy page, but also allows registered users to easily delete themselves, and to get all the information stored about the user.

Creating and Running the Project
All you need to do to get this support is to create a new ASP.NET Core 2.1 project and configure authentication to store user accounts in-app.

This creates a project with a privacy page (Views/Home/Privacy.cshtml) which needs to be filled with your content.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden…
View original post 865 more words
First look of ML.NET: Microsoft Machine Learning framework for .Net
Finally a Nuget package for Machine learning
I always wanted to have a Nuget package which can be plugged with a .Net application by which we can create Machine learning applications.
Microsoft has announced the Open source and Cross-platform Machine learning framework ML.NET
ML.NET first version
ML.NET is just a baby yet but it has already shown the capability of becoming a giant.
With its first version, we can perform Machine learning tasks like Classification, regression etc. Have a look here for some basic information for these ML algorithms.
Along with some basic algorithms – we can even train the model, predict using models along with other basic Machine learning tasks.
ML.NET can be extended to work with ML libraries like TensorFlow, Accord.NET, and CNTK etc.
A big picture

As you can see above, the framework can be extended to work with third-party libraries and it has some awesome…
View original post 471 more words
First steps with nullable reference types
This blog post is effectively a log of my experience with the preview of the C# 8 nullable reference types feature.
There are lots of caveats here: it’s mostly “as I go along” so there may well be backtracking. I’m not advising the right thing to do, as I’m still investigating that myself. And of course the feature is still changing. Oh, and this blog post is inconsistent about its tense. Sometimes I write in the present tense as I go along, sometimes I wrote in the past tense afterwards without worrying about it. I hope this isn’t/wasn’t/won’t be too annoying.
I decided that the best way of exploring the feature would be to try to use it with Noda Time. In particular:
- Does it find any existing bugs?
- Do my existing attributes match what Roslyn expects?
- Does the feature get in the way, or improve my productivity?
Installation
I…
View original post 1,639 more words
Mendeley Suggest Architecture
A Practical Guide to Building Recommender Systems
Kris Jack, Ed Ingold and Maya Hristakeva.
Introduction
Mendeley Suggest, a personalised research literature recommender, has been live for around nine months so we thought we’d mark this traditional human gestation period with a blog post about its architecture. We’ll present how the architecture currently looks, pointing out which technologies we use, justifying decisions that we’re happy with and lamenting those that we’re eager to reconsider.
Architectural Overview
A recommender system is more than just the smart algorithms that it implements. In fact, it’s a collection of five core components that are designed to interact with one another primarily to meet a set of user needs:
- User Interface
- Data Collection and Processing
- Recommender Model
- Recommendation Post-processing
- Online Modules
In the case of Mendeley Suggest, we aim to provide users with articles that help them to keep up-to-date with research in their field and explore relevant research that is, as of…
View original post 2,372 more words
Using In Parameter Modifier : C# 7.2
Changes are the only constant thing in the world and that got little faster with C# new releases as we have minor now releases (also referred as point releases) with significant enhancements. New features are getting added and existing features are getting enhanced. In one my earlier posts, I discussed about Ref and Out improvements that took places in C# 7.0. You can go through the link below.
Ref and Out improvements in C# 7.0
Let’s have a quick look on it

Here we can see that if we want to pass the argument by ref then reference of the instance (value type or reference type) is passed and any change the in the argument in the called method reflects in the calling method as well.
Note – If you are curious about the using the ref keyword with reference type object, you can have a look to one of…
View original post 254 more words
Paramore Brighter: DRY with Custom Decorated Command Handlers
You may wish to add similar functionality to many (or all) command handlers. The typical example is logging. You can decorate a command handler in a similar way to the policies I showed in previous posts to add common functionality. I’ve used this technique to guard the handler from invalid command arguments/parameters (essentially a validator), and for ensuring that we ping our APM (Application Performance Management) tool when a command completes. I’ll use the latter to demonstrate creating a custom decorator and handler to initiate this common code.
Paramore Brighter Command Processor will look for any attributes derived from RequestHandlerAttribute that are added to the Handle method on your command handler class. It will then use them to build a pipeline for your command.
So, in the example here, our attribute class looks like this:
public class HeartbeatAttribute : RequestHandlerAttribute { public HeartbeatAttribute(int step, HandlerTiming timing = HandlerTiming.After) : base(step…
View original post 413 more words
