In this post, let’s have a look at how we can create a HttpClient with HttpMessageHandlers that gets created at run time. I was hoping IHttpClientFactory would support that, […]
A few days ago I saw an interesting question where someone was asking what’s the preferred way to read some configuration, something like below. { “SomeSetting”: { “Config”: “Value” }} Would […]
In this post, let’s see what let is in LINQ query-syntax queries. I think it’s an overlooked feature in LINQ. Let’s consider the following query. IQueryable<string> wfhEmployees = from e in context.Employees &
When we are using Contains LINQ operator in an EF subquery, EF Core now generates better queries using SQL IN instead of EXISTS. This can result in […]
With ASP.NET Core 8.0, now you can secure Swagger UI endpoints by calling MapSwagger().RequireAuthorization. Consider the following code example. WebApplicationBuilder builder = WebApplication.CreateBuilder(args); builder.Services.AddEndpointsApiExplorer();builder.Services.AddSwaggerGen(); builder.Services.AddAuthorization();builder.Services.AddAuthentication(“Bearer”
There are often times that we have different implementations of an interface and we need to resolve a particular implementation when doing dependency injection. With ASP.NET […]
I recently spent quite an interesting time trying to get self-signed Certificate Authentication working with ASP.NET Core Web API Running in Azure Web Apps for Containers. […]