Fixed Bug where creators could set their games ratings#50
Merged
SuperGamer001 merged 3 commits intomasterfrom Nov 22, 2025
Merged
Fixed Bug where creators could set their games ratings#50SuperGamer001 merged 3 commits intomasterfrom
SuperGamer001 merged 3 commits intomasterfrom
Conversation
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.
SuperGamer001
requested changes
Nov 17, 2025
Member
SuperGamer001
left a comment
There was a problem hiding this comment.
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
previously approved these changes
Nov 22, 2025
Member
|
Oh, I think it was my new design. I'll get to that in a bit. :) |
SuperGamer001
approved these changes
Nov 22, 2025
Member
SuperGamer001
left a comment
There was a problem hiding this comment.
Looks good. :)
I do see one more issue that will need fixing, but it's better off as a separate issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #49
Make Rating nullable and add OwnerId to GameModels
Updated the
GameModelentity and related files:Ratingfrom theCreatemethod inGameModelsController.cs.Ratingnullable (int?) inGameModel.cswith a default ofnull.Ratinginput fields fromCreate.cshtmlandEdit.cshtml.20251114042121_NullableRatingto makeRatingnullable in the database.20251114043013_OwnerIdFKto introduce a non-nullableOwnerIdcolumn.