Blazor StateHasChanged() Oct. 19, 2018

On this episode we looked into what caused EF In-Memory to not work last week. We reworked the create customer page with Bootstrap 4 and strongly typed objects. The sample application can be found on GitHub at:

Also on the show, the Blazor “Dual Mode” project was explored. Blazor Dual Mode enables quick toggling between Blazor (WebAssembly) and Razor Components (Blazor server-side via SignalR). By having the ability to toggle between these modes we can enable debugging in Visual Studio at the click of a button.

Watch Blazor StateHasChanged is your weekly dose of Blazor community news and live code demos. from EdCharbeneau on


A no-JavaScript clone of Tetris using Blazor.

Feedback for Visual Studio Code

Daniel Roth is requesting feedback on Blazor support for Visual Studio Code. Make sure you drop by the chat and share your opinion.

A Breakdown of Blazor Project Types

On the show I broke down some Q/A from my article “A breakdown of Blazor project types”.

1 - How do I structure project so I can easily move to full-stack approach with WebAssembly later?.

I would use an n-tier application approach that takes the best of the Full-Stack and Razor Components project types. Using dependency injection you could swap out a service for the given project type that either talks to the database directly (Server Side) or via REST (Web Assembly). If structured properly you could even have other .NET clients such as Xamarin.

2 - I would use server-side approach for intranet solution (data entry, listing some reports) which is used by 600 clients daily. Would you say this is too much for server-side approach or should it handle without problem?

Depending on your infrastructure this should work fine. If your internal servers aren’t that robust, you can always offload work using Azure SignalR as a Service.

Blazor Dual Mode

Demo on how to dynamically switch from client to server side mode by appending ?mode=server to the url.

EF Core In-Memory Database Provider

**Continued from last week: ** On this show we used the In-Memory Database Provider to create a data sandbox. The first half of the show I struggled with the database not persisting as I had recalled it working in the past. Thankfully the chat room pushed through the issue and we found a resolution together. After the show ended, I looked at some previous samples and found how I had made it work before using only Startup.cs. You can see a reworked version of this example of Startup.cs below. This method doesn’t require hacking at Program.cs.

Events and More

Come hear about Blazor live and in person. DevReach, Sofia Bulgaria

Thanks to everyone who learned about the show at Louisville .NET

Podcast: Eat Sleep Code

Blazor Gitter

Chat with other devs about the Blazor project.

Ed Charbeneau

Ed Charbeneau

I'm Ed Charbeneau, web enthusiast, speaker, writer, design admirer, and Developer Advocate for Progress.