George Kosmidis

Microsoft MVP | Speaks of Azure, AI & .NET | Founder of Munich .NET
Building tomorrow @
slalom
slalom
Quantum Computing basics with Q# – The superposition of a qubit

Quantum Computing basics with Q# – The superposition of a qubit

There are some problems so difficult, so incredibly vast, that even if every supercomputer in the world worked on the problem, it would still take longer than the lifetime of the universe to solve!

Published 4 years ago

How to make authenticated requests to an ASP.NET Core web API using IdentityServer4 with Client Credentials.

This is a guide on how to make requests to a protected resource using Client Credentials with the IdentityServer4.Contrib.HttpClientService nuget package. The library is actually an HttpClient service that makes it easy to make authenticated and resilient HTTP requests to protected by IdentityServer4 resources. Additionally, more features include automatic complex type serialization for requests / deserialization for responds (using Json.NET), caching of the token response to reduce load and an HttpRequestMessage factory that adds an “X-HttpClientService” header for logging/tracking between cascading API calls.

Published 4 years ago
Microsoft MVP - George Kosmidis

Using TPL Dataflow Library for Concurrency Testing

The Task Parallel Library contains a very interesting set of dataflow components that for some reason they didn’t get the attention they deserve. This set is called TPL Dataflow Library and in few words, it is a robust in-process actor library that worth spending some time learning it! In this post, we will learn how to use it for concurrency testing.

Published 4 years and 3 months ago
Azure Architecture Icons - SVGs, PNGs and draw.io libraries
Integration Tests in ASP.NET Core API

Integration Tests in ASP.NET Core API

Automated testing is an important part of modern software production as it ensures higher quality and faster delivery, and on the same time it makes testing more affordable. Integration tests, sitting just between Unit Tests and E2E tests, improve test coverage and ensure proper communication between units. In this post, we will explore the possibilities of integration testing of ASP.NET Core by using xUnit to create a test for multiple endpoints.

Modified 4 years ago
Using LiteDB in an ASP.NET Core API

Using LiteDB in an ASP.NET Core API

LiteDB is serverless MongoDB-like database delivered in a single DLL (less than 350kb) fully written in .NET C# managed code (compatible with .NET 3.5, 4.x, NETStandard 1.3 and 2.0). It is ideal for mobile apps or for small desktop/web apps, and its API is very similar to MongoDB C# Official Driver.

In this post, we will see how to use LiteDB as a storage for an ASP.NET API and do simple CRUD operations with it.

Modified 4 years ago
Action results in ASP.NET CORE APIs

Action results in ASP.NET CORE APIs

ASP.NET Core supports creating RESTful services, also known as web APIs. To handle requests, a web API uses controllers with actions (in essence methods) that return an ActionResult. Since an ActionResult can be almost anything (it’s like returning an object from your methods), it makes sense to know how to use it and when to choose to return a specific type instead.

Modified 4 years ago

Unit testing a custom middleware in ASP.NET Core API

Middlewares are a fundamental part of any ASP.NET Core application, introduced from day one. They are executed in the order they are added on every request, and could be considered similar to the HttpHandlers and HttpModules of the classic ASP.NET. Since middlewares can execute code before or after calling the next in the pipeline, they are considered ideal for a ton of various application features, including exception handling, logging, authentication etc.

Modified 4 years ago