My name is Carl. I am a software engineer and architect. I blog about C#, .NET, Javascript, AngularJS, nodejs, and more. Thanks for visiting!



Buy me a coffeeBuy me a coffee

Tags

Welcome to CarlServer

Learn about me and see what I'm up to.

Featured Articles


Unit Testing Azure Functions With EF

In this post I demonstrate how to create and unit test an Azure function app that uses Entity Framework with an in memory database. I only debug the function app running on the local machine and never publish it to Azure, so no Azure subscription is required. This example uses Visual Studio 2022, .NET 6, Entity Framework 6.0.x, NUnit 3.x, localdb, and the azure functions tools with Visual Studio.

Read More...


Introduction to Azure Cognitive Search with Blazor WebAssembly

In this post, I explain how I added search to this blog using Azure Cognitive Search Service. First, I'll go through creating the search service and index in the Azure Portal and then I walk through configuring the application, which is written in Blazor WebAssembly to execute simple searches and display search results. This example uses Visual Studio 2022, .NET 6, and Blazor WebAssembly.

Read More...


Use Azure AD to Authorize Access to Azure Blob Storage

In this post, I show you how to enable authorization to Azure Blob Storage using IAM on a storage account. At the end of this post, you will understand how to leverage Azure Active Directory App Registrations, Identity Access Management, RBAC, and the C# Azure identity and storage APIs to securely access Azure blob storage containers and data.

Read More...


Use Azure AD and Microsoft Graph API to Manage Files in OneDrive

In this post, I describe how to authenticate to OneDrive using any Azure AD account or personal Microsoft account and upload and download files. At the end of this post, you will have an understanding of how to leverage Azure, Microsoft Identity, the Microsoft Graph API, and OneDrive for storage in your application. This post requires a Microsoft account and OneDrive subscription. The free one will work. It also requires an Azure subscription with permissions to modify Active Directory. I have not been charged yet with this example but Azure costs may apply depending on usage.

Read More...


Azure B2C authentication with API and SPA

In this post, I configure an Azure B2C tenant and show how to authenticate a user through a single page application to connect to endpoints in a custom API application. By the end, you will have a working demo of an authenticated user interacting with authorized API endpoints through a SPA using Azure B2C. The single page application contains a breakout-inspired game that tracks users' scores using a custom API. An Azure subscription is required but, at the time of this post, creating an azure B2C tenant is free up to a certain number of active users.

Read More...


My First WPF App: A Music Player Using MVVM Pattern

In this post, I examine a WPF application to play mp3 music. I will show how WPF can utilize the MVVM pattern to make code more testable. At the end of this post, you will have an understanding of the MVVM pattern and how to apply it to a WPF application with unit tests. The application is written in .NET core 3.1 and Visual Studio 2019.

Read More...


Example of the Strategy Pattern

In this post I explain the strategy design pattern and show an example of applying it to import data from different data sources. The strategy pattern is a behavioral design pattern that allows different implementations to be used interchangably at runtime. An application can select the appropriate method to perform a task. The example application lets the user import music data from a csv file source or json file source. Depending on the file type, the import strategy is chosen.

Read More...


Create Custom User Store for ASP .NET Core Identity - .NET Core 3 Update

This post is an update to my previous post on how to create a custom user store in dotnet core 2. It contains updated code for working with dotnet core 3.x, the Visual Studio 2019 MVC project template, and updated screenshots. The end result is the same, an in-memory user store to plug into the ASP .NET Core Identity system.

Read More...


Create Custom Password Hasher for ASP .NET Core Identity - .NET Core 3 Update

This post is an update to my previous post on how to create a custom password hasher in dotnet core 2. It contains updated code for working with dotnet core 3.x, the Visual Studio 2019 MVC project template, and updated screenshots. The end result is the same, a custom password hasher to plug into the ASP .NET Core Identity system.

Read More...


The Outbox Pattern in C#

In this post, I explain the outbox pattern and implement an example in C#. The outbox pattern can be used when one business transaction needs to happen as a result of another business transaction but it's not possible to combine them into the same database transaction. The example contains two applications. The first allows a user to add titles and authors of books. After a new book is added, a row is created in the outbox. The second application processes the entries in the outbox. The example requires .NET Core 2.1 and SQL Server 2017 express.

Read More...


Use Dropbox for Persistent Storage with an Angular Application

In this post, I create an Angular application that uses Dropbox for persistent storage. I start with creating a regular Angular app using the Angular CLI and then add Dropbox integration to it. At the end, you will have a working example of Dropbox integration with an Angular app.

Read More...


Using C# dynamic Keyword To Replace Data Transfer Objects

For this post I'm going to show 3 examples of using the C# dynamic keyword when deserializing input data instead of using data transfer objects. Many modern applications need to accept data from a variety of sources. Often times we create data transfer objects just to handle requests and responses to and from the data source. Using dynamic in C# reduces the need for data transfer objects and keeps the logic that depends on the 3rd party data source contained to one place.

Read More...



© 2025 Carl Layton Creative Commons License Disclaimer
An unhandled error has occurred. Reload 🗙