Cross-platform .NET sample microservices and container based application that runs on Linux Windows and macOS. Powered by .NET 7, Docker Containers and Azure Kubernetes Services. Supports Visual Studio, VS for Mac and CLI based environments with Docker CLI, dotnet CLI, VS Code or any other code editor. Moved to https://github.com/dotnet/eShop.
This pull request refactors two sections of the code to improve readability and robustness.
The first change updates the null check in the assignment of the filterQs variable to remove redundancy. The brand.HasValue check was used twice, which is not necessary. The null check was removed from the variable assignment and placed only in the if statement where it is needed.
The second change updates the call to GetAuthorizationContextAsync to use the null-conditional operator ?.. This helps to avoid a potential NullReferenceException if the model object is null.
This pull request refactors two sections of the code to improve readability and robustness.
The first change updates the null check in the assignment of the filterQs variable to remove redundancy. The brand.HasValue check was used twice, which is not necessary. The null check was removed from the variable assignment and placed only in the if statement where it is needed.
The second change updates the call to GetAuthorizationContextAsync to use the null-conditional operator ?.. This helps to avoid a potential NullReferenceException if the model object is null.