Blog

Blog posts on .NET, Azure, and more.

Improving EF Core performance with Compiled Queries

February 15, 2023 by Anuraj

AspNetCore EFCore

This post is about improving EF Core performance with Compiled queries. From EF Core 2.0 onwards, EF Core supports compiled queries, which helps developers to compile the queries in advance and executed when application executes the query. By default EF Core automatically compiles and caches your queries using a hashed representation of the query expression - when the code runs the previously executed query, EF Core lookup the cache with the hash value and returns the compiled query from the cache. We can explicitly compile the query upfront and invoke the compiled query. To compile the query, EF Core exposes two extension methods in EF class - EF.CompileQuery() and EF.CompileAsyncQuery(). These methods helps us to create compiled queries and call them using a delegate.

Implementing CRUD operations with ASP.NET Core Web API and Mongo DB

January 14, 2023 by Anuraj

AspNetCore MongoDb MinimalAPI WebApi

This post is about implementing CRUD operations with ASP.NET Core Web API and Mongo DB. In this post I am using a nuget package with the name MongoFramework - which is an Entity Framework like implementation for MongoDb. I am following the schema and implementation of the Microsoft Learn documentation about Create a web API with ASP.NET Core and MongoDB.

Implementing Authentication in Azure Static Web Apps - Part 2

January 13, 2023 by Anuraj

Azure Security Static Web Apps

In the last post we discussed about implementing the authentication in Static Web App Free Plan. For Standard plan, we can use our own client Id and client secret of the social provider. Using your own client Id and client secret will help you to avoid the Azure concent screen once you logged into the app. Something like this.

Implementing Authentication in Azure Static Web Apps - Part 1

January 10, 2023 by Anuraj

Azure Security Static Web Apps

This post is about implementing authentication in Azure Static Web Apps. Azure Static Web Apps is a service that automatically builds and deploys full stack web apps to Azure from a code repository. Similar to Azure App Service, Azure Static Web App offers authentication out of the box. The service offers five authentication providers - Azure AD, Twitter, GitHub, Google, and Facebook, out of the five, two of them, Google and Facebook are in preview mode. In this post we will explore the Static web app running on Free Plan. For Standard plan we need to configure the social provider client Id, client secret and callback URIs. For Free plan there is no configuration required.

Automated versioning and package publishing using GitHub Actions

December 02, 2022 by Anuraj

Docker NuGet Github DevOps DotNet

This post is about implementing versioning and publishing docker images and nuget packages using GitHub Actions. I am not explaining about semantic versioning. There is already a lot of content explaining about these things.

Copyright © 2024 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub