Blog
Blog posts on .NET, Azure, and more.
ASP.NET Core Logging with Serilog and SQL Server
January 01, 2024 by Anuraj
AspNetCore Logging Serilog
Serilog stands out as an excellent third-party library for implementing structured logging in ASP.NET Core applications. The adoption of structured logging is crucial for generating logs that are both easily readable and filterable. Opting for SQL Server as a log destination provides the advantage of harnessing SQL querying capabilities for efficient log filtering. This becomes particularly beneficial when our application is already integrated with SQL Server.
How to use identity to secure a Web API backend for single page apps
December 19, 2023 by Anuraj
AspNetCore Security Identity
This post is about how to use Identity to secure a Web API backend for SPAs such as Angular, React, and Vue apps. Unlike ASP.NET Core MVC, Web API projects doesn’t support the --auth Individual option while creating the Web API project from dotnet SDK. We have to manually add the nuget package references. So first we need to create a web api project, we can do that using the following command - ` dotnet new webapi –name Weatherforecast.Api –output Weatherforecast`. Next we need to add reference of different NuGet packages. I am using Sql Server as the backend.
Getting started with .NET Aspire
December 17, 2023 by Anuraj
Azure Cloudnative
This post is about installing dotnet aspire. The .NET Aspire is an opinionated, cloud ready stack for building observable, production ready, distributed apps. .NET Aspire is delivered through a collection of NuGet packages that handle specific cloud-native concerns. Cloud-native apps often consist of small, interconnected pieces or microservices rather than a single, monolithic code base. Cloud-native apps generally consume a large number of services, such as databases, messaging, and caching.
Building Sql Server Database projects with dotnet CLI
December 14, 2023 by Anuraj
DotNet SqlServer Azure
This post is about creating sql server database using dotnet CLI.
Integrate OpenAI API in ASP.NET Core
November 28, 2023 by Anuraj
DotNet OpenAI Azure
This post is about integrating Open AI API in ASP.NET Core. We can integrate Open AI using REST API and using Open AI SDK.
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