MongoDB is a database based on JSON-like documents, but it can be queried using C#. We’ll see how to perform CRUD operations and we’ll create some advanced queries.
Continue reading
Wouldn’t it be nice if Visual Studio could autogenerate clients for external API? It is actually possible, if they expose an OpenAPI file. Let’s see how!
Continue reading
Swagger is a tool that exposes the documentation of your APIs and helps collaborating with other teams. We’ll see how to integrate it with .NET Core 3, how to add XML comments and status codes.
Continue reading
Integration tests are useful to check if multiple components fit together well. How can you test your APIs? And how can you mock dependencies?
Continue reading
You’re using DateTime.Now, aren’t you? Be careful, because it may bring some troubles to your application. Here I’ll explain why and I’ll talk about time zones and formatting in C# DateTime.
Continue reading
Sometimes on your tests you need to access test files, for example for mocking external data. With manifest resources you can easily reference files for your tests.
Continue reading
BenchmarkDotNet allows you to test the performance on .NET methods. So let’s answer a question: is the Enum.HasFlag method really that slow?
Continue reading