Elevate Your Visual Studio TODOs

I recently had an instance when making a hot fix where I left some unintended code behind.   This is a constant worry of mine – trying to not forget to remove a temporary value during a quick true-up, or maybe a clearing a change only meant locally, deleting tweaks never meant to be committed.  I tried diligently setting up TODOs, but with large solutions, it became impossible to discern between future todos and immediate todos.

The Fix: Warn About TODOs Extension

Visual Studio Extension: Warn About TODOs

Luckily, I found a Visual Studio tool for this:  Warn About TODOs. This handy extension lets you flag your TODOs with varying degrees of severity and puts each in your error list, making them harder to miss.

Continue Reading

Your Own MySQLServer (From Linux VPS to Azure Deploy)

From VPS to Deployment on Azure

Last year, I posted how to include a .NET API into WordPress using a custom PHP plugin using a free MySqlServer database as a backend.  It worked and works great – but admittedly, I slack on renewing my “free” credentials and the demo kept going down.  This week, I finally had the time to set up my own MySql database server for roughly $15 a year.  Yep, a year.

I’ve gathered the resources, from getting your own cheap Virtual Private Server and where, to the tutorials I used and the notes I took during setup, to deployment on Azure.

Getting a Cheap VPS

Black Friday is one of my favorite times to shop online for random hosting deals!! The past couple years, my fave to hunt for are “low-end vps” deals. Why? Well, it’s your own server to put any Linux distro you want on it, control and learn from, destroy, rebuild, and use it however you want. Whats not to love? Oh – right it’s cheap, and therefore a bit unstable. Some companies appear and disappear overnight, I wouldn’t consider your data absolutely not guaranteed to disappear overnight, etc. For side projects and learning purposes, though, it’s great!

I have used two now that have stayed very reliable the past couple of years:

Continue Reading

Seed/Migrate Enum to Table with Entity Framework

My latest project included integrating employees into Active Directory via 3rd party API.    I successfully did so, but afterward, my team requested some sort of log to monitor the integration.

The activity log I created included to an ActionType int that was related to an enum.  For transparency, I wanted to transfer those enums into a small table, that way those values could be easily available to our team, all of whom have SQL query skills, but are not all developers.

A simple idea and solution, to migrate enums to a table using Entity Framework, just not something I had done using CodeFirst.  Here’s how I got it working.

Continue Reading

Simple Signature Pad (Blazor, Canvas, JS, .NET 5)

I had a project using a Blazor Signature package that kept throwing intermittent errors with its signature pad.  It appeared to be an issue between its interaction with Javascript, but since it was encapsulated within the package, I could’t debug it.

Instead of using a package, I decided to break it up by using the most popular JS signature pad (https://github.com/szimek/signature_pad) and JSInterop in Blazor to facilitate the communication between .NET and Javascript.

For the quick demo:

CODE SOLUTION

Blazor Fiddle: https://blazorrepl.telerik.com/mQlEEQaP03xh4BFS58

  https://github.com/catriname/BlazorSignatureJS

Continue Reading

.NET API into WordPress Front End

It’s absolutely unholy.  .NET Standard with a WordPress front end!?  Yes, it’s possible.  This odd concoction happened when the front-end developer hired claimed he could consume/operate his design around any language, but actually could only produce WordPress websites.  My solution was to use a .NET Core API on top of our product database (MSSQL) and then write my own PHP WordPress Plugin that would list products by product line and then another plugin to display the products clicked in that product line.  All products are maintained in another .NET Core app that allows for the products to be centralized in one spot while the front end design can be just about anything.

To walk through how I did this,  I’ll start with the creation of the .NET Core API.

Continue Reading
1 2 3 7