Skip to content

Fixed Bug where creators could set their games ratings#50

Merged
SuperGamer001 merged 3 commits intomasterfrom
Issue#49-RatingInGameAndEditPages
Nov 22, 2025
Merged

Fixed Bug where creators could set their games ratings#50
SuperGamer001 merged 3 commits intomasterfrom
Issue#49-RatingInGameAndEditPages

Conversation

@logprogrammer92
Copy link
Contributor

Closes #49

Make Rating nullable and add OwnerId to GameModels
Updated the GameModel entity and related files:

  • Removed Rating from the Create method in GameModelsController.cs.
  • Made Rating nullable (int?) in GameModel.cs with a default of null.
  • Removed Rating input fields from Create.cshtml and Edit.cshtml.
  • Added migration 20251114042121_NullableRating to make Rating nullable in the database.
  • Added migration 20251114043013_OwnerIdFK to introduce a non-nullable OwnerId column.
  • Updated designer files to reflect schema changes.

Updated the `GameModel` entity and related files:
- Removed `Rating` from the `Create` method in `GameModelsController.cs`.
- Made `Rating` nullable (`int?`) in `GameModel.cs` with a default of `null`.
- Removed `Rating` input fields from `Create.cshtml` and `Edit.cshtml`.
- Added migration `20251114042121_NullableRating` to make `Rating` nullable in the database.
- Added migration `20251114043013_OwnerIdFK` to introduce a non-nullable `OwnerId` column.
- Updated designer files to reflect schema changes.
@logprogrammer92 logprogrammer92 self-assigned this Nov 17, 2025
@logprogrammer92 logprogrammer92 added bug Something isn't working enhancement New feature or request front end Issue for front end development. (Client-side, web pages) back end Issue for back end development. (Server-side) labels Nov 17, 2025
Copy link
Member

@SuperGamer001 SuperGamer001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment for one change recommendation. Everything else looks good. :)

Removed the explicit default value assignment (`= null`) for the
`Rating` property in the `GameBox.Models` namespace within the
`GameModel.cs` file. The property now relies on the default
behavior for nullable integers, which is `null` by default.
SuperGamer001
SuperGamer001 previously approved these changes Nov 22, 2025
@SuperGamer001
Copy link
Member

Oh, I think it was my new design. I'll get to that in a bit. :)

Copy link
Member

@SuperGamer001 SuperGamer001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. :)
I do see one more issue that will need fixing, but it's better off as a separate issue.

@SuperGamer001 SuperGamer001 merged commit fba5d9d into master Nov 22, 2025
1 check passed
@SuperGamer001 SuperGamer001 deleted the Issue#49-RatingInGameAndEditPages branch December 5, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

back end Issue for back end development. (Server-side) bug Something isn't working enhancement New feature or request front end Issue for front end development. (Client-side, web pages)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rating in game create and edit pages

2 participants