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

Getting Linux Running on WSL2 (Windows)

I haven’t touched Linux in many years and after seeing Microsoft’s Build this year, I thought it would be a fun project to get into.  Some things might seem a given to those used to running Linux, but as I haven’t done this in many years, it’s always wise to document.

Before You Begin

Continue Reading
1 2 3 7