-
Notifications
You must be signed in to change notification settings - Fork 10
FEAT: Upgrade to .NET 10 #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…er small refactors to update the current code with the most recent language features.
Added CompatibilityLevel configuration to EF Core configuration for most recent features usages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we've upgraded to .NET10 in this PR, we need to decide if we want to continue to keep a .sln file for compatibility or if it's possible to remove it and just have the new .slnx file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I believe we can get rid of the .sln file for good 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the .sln file but I think the templating has not fixed the issue with XML conditional processing in .slnx files. We have a solution to that though so it is not a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, what problem was it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Within the .slnx file we have the <!--#if --> blocks. These were not being processed in the expected way for this file type when we first added the .slnx file. We have a SpecialCustomOperations item in the template.json file that deals with handling these blocks in the .slnx file.
I've not tested if the templating has been updated more recently to fix the issue on their end that would mean the SpecialCustomOperations item for the .slnx file is no longer needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, now I get it... I would have expected that the .slnx would behave like any other XML file and that they would have prepared the templating engine accordingly... Isn't there any information about this for the templating engine?
|
@matthewtoghill please check the latest changes out... I've replaced the Swashbuckle implementation for Swagger with Scalar and also included the document and operation transformers for the API security so everything can work pretty similar to how it was with Swashbuckle, but without all the custom code for fixing its issues. |
… block extension methods.
…auth flag is false as base property is also removed
Looks good, there was an old issue related to the auth flag being false that is now fixed, or it can be fixed another way if you prefer. When |
EntityTypeConfiguration now uses ValueGeneratedNever for IDs, shifting ID generation from the database to the application (via Guid.NewGuid()). Updated entity constructors, command handlers, and tests to align with this approach. Adjusted EF Core migrations and model snapshots to remove ValueGeneratedOnAdd. Cleaned up related test and factory code for consistency.
| } | ||
|
|
||
| var requiredScopes = metadata.OfType<IAuthorizeData>() | ||
| .Where(a => !string.IsNullOrEmpty(a.Policy)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use string.IsNullOrWhiteSpace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Refactored MediatorExtensions to support CancellationToken in all methods, improving async and cancellation handling. Introduced CreatedResponse record for standardized creation responses. Updated Companies, Products, and Files endpoints to use new Mediator methods and return Created<CreatedResponse>. Adjusted integration tests to validate CreatedResponse. Improved code clarity and authorization policy checks.
|
@matthewtoghill please review the latest changes I introduced. Lastly, please be kind to let me know if you find any issue when running the whole tests battery (including the Integration ones in the same process)... I experienced an issue with the CreateProduct one, where the assertion checking if the ProductCreated message has been consumed is failing, but when I run it individually it succeeds, so I'm not sure if it's my crappy laptop or what, so if you could run it and let me know, that would be great! Thanks! Cheers! |
Description
Upgrade the solution to .NET 10.
AsQueryable()[FromFile]annotation on endpointIFormFileparameternameofRelated Issue
Closes #101
How Has This Been Tested?
Tests pass
Test apps created from template created successfully, build and run as expected
Types of changes
Checklist: