Single Transaction per Request ASP.NET Core With EntityFramework
In this article, we’ll configure ASP.NET to open a single transaction per request and commit it when the request finishes.
In this article, we’ll configure ASP.NET to open a single transaction per request and commit it when the request finishes.
The question of which test framework to choose can appear for a new project or when the team decided to make an experiment trying to improve some internal problem. It’s well known for .net developers that there are three main frameworks: MSTest, NUnit, and XUnit. MSTest is out of scope for this article. I didn’t meet any project which uses it as a primary test framework. I certainly sure such projects exist, and it could be that developers from these projects have written a comprehensive guide щт why to choose MSTest.
It’s almost November, and release for .NET 6 is on the way. Time to take a look at what was added in the new release if you have not done this yet. I’ll highlight a few handy features that .net 6 brings for us. If you follow the latest updates from .NET Team, you already get these updates in preview4.
Nowadays, a good API should provide documentation, and there are different tools to succeed in it. A swagger is a tool that was created to help us prepare documentation for our API and allows consumers to try and start using it efficiently.
It is so often to write service with business logic and give it a lot of responsibility. When I started my career, I was guilty of doing such a thing. And testing a complex service that handles many different logical parts is like a nightmare. Step by step, trying to make my life easier, I`ve reopened decorator ( design pattern ) for myself.
Functional testing is the next level above the unit testing and gives us confidence that the code we wrote works as intended. If we are talking about functional testing in the scope of ASP.NET, we mean how we test our API.
One of the requirements for a good API is the ability to validate input relying on different business rules. As developers, we always care about validation when getting any data from clients.