The preparatory work for this lab involved downloading MySQL Workbench and Visual Studio 2015. The Visual Studio application needs to stay as an older version in order for the DinoStore code to continue to work.
Once the programs are downloaded, the Net702.DinoStore folder is moved into the visual studio projects folder that was automatically created with the program’s installation. In the MySQL program, during the installation setup, I create a root user and password that will be used for creating further MySQL connections.
In MySQL, a new connection called DinoStoreLocalConnection is created.
In the connection, the file ‘dinostoredb-tablecreation-script.sql’ is opened and run, this creates the schemas; ‘dinostoredb’ and ‘dinostoremembershipdb’. In the ‘dinostoredb’ schema, the file ‘MySQLProductTable_local.csv’ is imported.
While MySQL running, the Visual Studio project solution file; ‘Net702.DinoStore’ is opened. Within the Solution Explorer, in the Web Config, the connectionStrings lines are edited to include the password of the database just created. This is to ensure that the link between the MySQL database and the executed script connects properly with the correct authorization.
In the Server Explorer, in the Data Connections menu, double-clicking on the ‘Net702.DinoStore’ connections connects the Visual Studio code to the MySQL database server and schemas.
The next step is to manage the NuGet packages for Visual Studio. The AWS packages are important update for the later labs.
The final step is to build the solution. Then when ‘View in Browser’ is clicked, the DinoStore web page should open. The images will have local sources.
I personally had a few problems with having my images properly transfer onto the web page.
After seeking help from a classmate, he helped show me that my image source in the product table in MySQL were incorrect, and that my Net702.DinoStore file was in the wrong place. Once these were fixed, I updated the MySQL database and rebuilt the Visual Studio code. The web page then showed the desired product with all of the image elements.