The big difference with this homework is that we are using a pre existing large database to setup our project. The last homework had us create one from scratch. In this homework we are tasked to create a paged lookup system that can access the given database and nicely output the contents. Also, it must be able to create and save reviews as well.
To start out this project, we went to the URL in the assignment to download the necessary Adventureworks Database. At first, the raw database starts as a .bak file. It must be unpacked and assigned to the correct location. For me, I opened SQL server management studios and just unpacked it with a right click and selected the correct drop down item. Once that was established I started the project as a basic MVC template just like before. However, this time since we have a existing database I was able to create the Model and dbcontext through the database first setup tool. This was quite a handy feature as it does create quite a few classes by itself. As well as the dbcontext and connection string in the webconfig area.
Not much to see here. Basically it is just a landing page that links to the actual fun area.
This area is the backend for my products searching engine that was needed. I also included the backend for reviews here as well. I have shown the first two controller methods. The rest can be seen on the git repo.
Next up, I autogenerated and changed as much as I could to create some nice views for each controller function. I attached one of the view's code below for an example. The other views are in the git repo as well.
I found during working with this Homework that it was much easier to work with a database that has been created for you. However, it definitely shows just how important having a well designed database is since that is where one starts building an application.
Link to: Homework Six
Link to: Repository for hw6