.NET

Clean Up & Sort Unused .NET Using Statements in Visual Studio

No need for an extension or ReSharper to sort and remove unnecessary using statements in .NET projects with Visual Studio. This is now built in, but you have to enable it.

Fixing Entity Framework Validation 30000 No Type Specified for the Decimal Column

Here's a quick fix for Entity Framework's Validation 30000 errors that show up on decimal columns.

NotSupportedException No IUserTwoFactorTokenProvider<TUser> named 'Default' is registered

While messing around with .NET Core 2 and Identity, I ran into this error.

Scrape a Website & Send an E-mail with Azure Functions

Serverless Functions are an awesome way to create small tasks that can run on a schedule, by the click of a button or using your voice. We'll create a function that visits a website, collects important data & sends that via an e-mail back to us on a schedule.

Hosting Blazor on Netlify

Since Blazor is a frontend framework, we can host our Blazor apps on any serverless or static web host. The only requirement is that we can add minor configuration to redirect URLs so that all URLs point to our index.html page. Netlify fits this perfect. Netlify also happens to be my favorite host for static websites.

How to Access the Hosting Environment in ConfigureServices

It can be useful to run different services in Development vs Production. The .NET Core templates do this within certain methods, such as the Configure method in the Startup class but there is no example of how to do it in the ConfigureServices method within the Startup Class.

Keep Your Startup Clean

Don't let your Startup.cs file turn into a mess. Use extension methods to keep it clean.