Latest Posts
Tuesday, August 3, 2021
In the last post we created our ACME Bank database in MySQL, the next step is to get the values from the Values table in the Asp.Net Core WebApi controller.
Let's create some test data so that we could retrieve the values from the database. The Values table could contain anything. So I am going to store famous philosophers throughout history. These philosophers are so famous that they only have one name:
You can run the SQL insert statement below to seed the data in MySQL:
INSERT INTO acmebank.Values (
Name
)
VALUES
(
'Socrate'
),
(
'Plato'
),
(
'Spock'
),
(
'Thanos'
);
So your Values table should look like this when you executed the insert query
Thursday, July 29, 2021
In this post we are going to create our first Entity Framework migration and creating an actual database in MySQL.
In order to do that we need to add a few NuGet packages to our Asp.Net Core project including the Entity Framework Core package. But, before we do that we want to find out what what version of .NET Core we are running. Obviously I have it memorized, but for the rest of you, you can type the command dotnet --version to figure out what the version is :) It's always a good idea to try and match the package version with the .NET Core runtime you have. It's one of the more annoying thing with Angular and Asp.Net Core, it's changing constantly. So as you can see my version 3.1.xxx so I should try to install packages that are made for 3.1.x.
The first package we are going to install is the Microsoft.EntityFrameworkCore. So open the ACMEBank.API project with Visual Studio Code. Press Ctrl+Shift+P and type NuGet and select
Tuesday, July 20, 2021
In this post we are going to install MySQL Workbench on Fedora. MySQL Workbench is a great GUI database management tool for MySQL. Even though we can do everything we need with MySQL on the terminal it's nice sometime to see the tables and data visually.
Here are the steps to install MySQL Workbench:
1, Go to the yum repository for MySQL at https://dev.mysql.com/downloads/repo/yum/ select the Fedora repository, and click "Download"
Tuesday, July 13, 2021
In this post we are going to circle back to MySQL and continue setting up our MySQL database, so that we can use it in our application. Since we don't want to use our root for log in and we turned off root login for remote connection. We have to create a dedicated user for our application. Here are the steps to create a dedicated dev use in MySQL
1. Log into MySQL with root using this command mysql -u root -p
2. In the MySQL prompt type CREATE User 'devuser'@'localhost' IDENTIFIED BY 'P@ssw0rd'; to create the user, obviously if this is your production environment you would want to use a more secure password
3. Then type GRANT ALL PRIVILEGES ON *.* TO 'devuser'@'localhost' WITH GRANT OPTION; to grant the user all the privileges on all the objects
4. Now type FLUSH PRIVILEGES; to update and apply the privileges
Tuesday, June 22, 2021
The most important thing for most modern dynamic application these day is choosing a database to store your data. If you are on a Windows environment then you use SQL Server database that is a fine choice. But if you are on Linux MySQL is a great choice also. In this post we are going to go through how to install MySQL server on our Fedora development machine.
Here are the steps to install MySQL on Fedora Linux:
1. First we need to add the MySQL repository to our machine by tying in the following command in the terminal
sudo dnf -y install https://dev.mysql.com/get/mysql80-community-release-fc32-1.noarch
Tuesday, June 1, 2021
In the next month or so I will start a series of blog posts that will take you from scratch on how to deploy an Angular application that makes API calls from an Asp.Net Core web api backend using Entity Framework Core as it's ORM and MySQL as the database. Most tutorials would end there, but I will take it further and deploy the application on AWS so that it lives on the world wide web. Since I don't want to start from scratch I will be modernizing the ACME bank application that I've started with AngularJS. If you are working with AngularJS you know that it's time to update and upgrade because it's at its' last legs and Angular is the future. Some say the journey is more rewarding than the destination. I hope, you will join me on this journey. Thank you, here is a diagram of what's to come






