Programming

.NET Core Entity Framework Migrations

Posted on

When you don’t want to script out your own database, Entity Framework Core has your back. When you change your database context or the models it uses, you can use a couple of commands to create and update your database to keep it in sync with your model. These examples run in the Package Manager […]

Programming

Removing Special Characters and Diacritic Marks in C#

Posted on

I did this trick in JavaScript to remove diacritic marks a while back and the need to perform a similar transformation in C# came up this week. The following method simplifies strings such as “façade” into simple string like “façade”. private static string Simplify(string input) { string normalizedString = input.Normalize(NormalizationForm.FormD); StringBuilder stringBuilder = new StringBuilder(); […]

Programming

Using .NET Core Identity Without the Standard Pages

Posted on

This is a quick article about using .NET Core Identity without the standard pages. It was almost titled “why does .NET Core Identity ignore my LoginPath that I set in options?”. Let’s start with a common chunk of code that you’ll find in your Startup.cs file if you’ve added identity to your project… services.AddIdentity<ApplicationUser, ApplicationRole>() […]

Programming

Minification Failed. Returning Unminified Contents.

Posted on

Has you ASP.NET applicaiton reported that minification failed? If you are using bundles in application, you might come across this exception comment at the top of your larger-than-expected bundle file. /* Minification failed. Returning unminified contents. (List of problems here) */ It can happen for JavaScript or CSS, but it means minifier has found something […]

Windows

Failed to Load penimc.dll and Related Problems

Posted on

Following on from a series of recent Windows Updates, a couple of our servers had a problem running Server Manager (“Server Manager has stopped working”) and SQL Management Studio (“Failed to Load penimc.dll”). The details of the Server Manager error were in the event log: Application: ServerManager.exe Framework Version: v4.0.30319 Description: The process was terminated […]