Lesson 6.4: Refactor Services to Consume Multiple Repositories

In the previous lesson, we created a new BlobStorageReadRepository and exposed various typed instances of it through our RepositoryFactory. Today, we are going to update our FunctionServiceHelper to switch between target repositories based on a query string parameter. This will allow us to easily test our game services using different back end Azure storage solutions. … Continue reading Lesson 6.4: Refactor Services to Consume Multiple Repositories

How-To: Define Parameters on a Blazor Component

Components can be made more generic by passing in parameter data which the component then uses in its layout and rendering. Rather than hard-coding all of the content of a component, we can expose parameters that allow the component users some flexibility. Component parameters are defined using public simple or complex properties on the component … Continue reading How-To: Define Parameters on a Blazor Component

How-To: Create New Blazor Component

Blazor apps are based on components. A component in Blazor is the atomic unit of composition for any UI element, such as a page, control, dialog, or data entry form. Components are .NET C# classes built into assemblies. They can: Define UI rendering logic.Handle user events.Be nested and reused.Be shared and distributed as Razor class libraries or NuGet packages. The … Continue reading How-To: Create New Blazor Component

Lesson 6.3: Create Blob Storage Repository

In Chapter 5, we created a repository interface (IReadableRepository) and repository implementation (InMemoryReadRepository) that loaded data from embedded resource files. We designed our system with these abstractions because we want to try out several Azure storage technologies, and the repository interface gives our service code a measure of isolation from the data implementation technologies. As … Continue reading Lesson 6.3: Create Blob Storage Repository

How-To: Create Blazor App Splash Screen

When applications require time to load up, they usually provide a splash screen to give the user something to watch, provide feedback that the application is loading, and start building the user interface branding for the app. Blazor also has the ability to show an HTML splash screen, while the Blazor WebAssembly and possibly the … Continue reading How-To: Create Blazor App Splash Screen

How-To: Unit Test Blazor Pages with DataBinding

Continuing with our use of the bUnit testing library for Blazor components. We will investigate how to create unit and component tests for pages/components that use both one-way and two-way data bindings. We will look at changing data on the page and performing actions (like button clicks) and then seeing how that impacts the page rendering. … Continue reading How-To: Unit Test Blazor Pages with DataBinding

Lesson 6.2: Create Blob Storage Container

Azure Blob Storage is an option for saving raw files in containers that can be retrieved and read in our services. We can use a storage account and container to hold our data files. They can be updated by tools, uploaded by the operations team, or edited in Azure directly. Then, the data becomes available … Continue reading Lesson 6.2: Create Blob Storage Container

App-Idea 3: Ultra Number Converter

Inspired by the number converters in the app-ideas project, I decided to create an uber number converter that allows users to pick from various number systems and convert to another one... instead of build more converters for octal and hexadecimal. Plus, this allows us to learn about build more complex UI in Blazor. In this … Continue reading App-Idea 3: Ultra Number Converter