southeastmn-edu-2754 / movie-corner

0 stars 0 forks source link

Database & EF model implementation #3

Closed mswanson-mscst closed 4 years ago

mswanson-mscst commented 4 years ago

In the past two days I've made several new recordings:

36 - 38 show the process I used for setting up the current version of the project in the Movie Corner repository.

39 - 41 show how to:

To fix a problem I ran into while scaffolding the EF model classes from the database, I had to change the database structure slightly by removing the Genres table. So unfortunately, if you downloaded the Movies database from D2L before yesterday and attached it to SQL Server, you'll have to delete the old version of the database and download the new version. (This is why the DbInitializer feature and the Migrations tool would be so useful, if we could have used them here.) You'll find the new Movies database in D2L in the Materials / Content / Course Documents menu.

The next step will be for one of you to use the procedure in #39 - 41 to add the database tables to the project and commit/push the updates back up to GitHub. Any volunteers? To get started, post a comment in the "Database & EF model implementation" issue in GitHub to let the other team members know. I'd like to wrap up this step in the next couple days.

jseppa-mscs commented 4 years ago

Starting the procedure outlined in videos 39-41.

mswanson-mscst commented 4 years ago

Thanks! When you're finished, go ahead an commit/push back to GitHub the usual way. We'll deal with branching and merging later.

jseppa-mscs commented 4 years ago

Committed and pushed.

mswanson-mscst commented 4 years ago

Thanks! Joshua added the User table but it appears that we still need three more tables:

If you can work on them this weekend, post a comment here.

2754-movies-2020-uml

ummer-siddique-mscs commented 4 years ago

I added user, permission, user-watchlists and user-title-rating tables and pushed it to Github. The file is labeled as CreatedTablesNew.sql. Here is the diagram - image

mswanson-mscst commented 4 years ago

Looks good. These kinds of modifications always take a lot longer than you'd think.

I decided to make a few more modifications to standardize the variable names and simplify the structure. The main change was that I removed the direct association from Permission to Watchlist since the User_Watchlist table needs to track that association for each user anyway.

So here's the current version of the database:

2754moviesdb

Ummer wasn't able to run the scaffold procedure on his machine for creating the model classes and webapi controllers, so I ran those procedures on my machine. The current repository includes all of those classes. I successfully tested the webapi for Users and Permissions, so it's time to close this issue and move on to the next sprint.