Skip to content

Remove unused _contextAccessor field from controllers#672

Merged
KrzysztofPajak merged 1 commit intodevelopfrom
fix/remove-unused-contextaccessor-fields
Apr 1, 2026
Merged

Remove unused _contextAccessor field from controllers#672
KrzysztofPajak merged 1 commit intodevelopfrom
fix/remove-unused-contextaccessor-fields

Conversation

@KrzysztofPajak
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 1, 2026 18:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes an unused IContextAccessor dependency (constructor parameter, backing field, and using Grand.Infrastructure) from several MVC controllers to simplify DI requirements and eliminate dead code.

Changes:

  • Removed IContextAccessor constructor injection and _contextAccessor fields from affected controllers.
  • Removed now-unused using Grand.Infrastructure; directives.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/Web/Grand.Web.Vendor/Controllers/HomeController.cs Drops unused IContextAccessor injection/field and related using.
src/Web/Grand.Web.Admin/Controllers/SpecificationAttributeController.cs Drops unused IContextAccessor injection/field and related using.
src/Web/Grand.Web.Admin/Controllers/ProductAttributeController.cs Drops unused IContextAccessor injection/field and related using.
src/Web/Grand.Web.Admin/Controllers/PaymentTransactionController.cs Drops unused IContextAccessor injection/field and related using.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

@KrzysztofPajak KrzysztofPajak merged commit 6409f8b into develop Apr 1, 2026
11 checks passed
@KrzysztofPajak KrzysztofPajak deleted the fix/remove-unused-contextaccessor-fields branch April 1, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants