Skip to content
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

AB#122 Feature/122 Create TaskItemRepository #9

Merged
merged 7 commits into from
Feb 2, 2025

Conversation

zhiyizhu805
Copy link
Owner

Pull Request Title (Mandatory)

  • Create TaskItemRepository

Description (Mandatory)

  • What does this PR do?
    Create a ITaskRepository interface and TaskRepository class to implement the CRUD methods.
    Use dbcontext in the TaskRepository.
    Replace the dbcontext by the IRepository in the /tasks controller
    Use DI to inject the interface to the controller.
  • Why is this change necessary?
    To implement a repository pattern for better abstraction, maintainability, and testability by injecting ITaskRepository into the TaskItemsController via dependency injection.

Checklist (Mandatory)

Please ensure your PR meets the following requirements before submitting:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added or updated relevant documentation (if applicable).
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing tests pass locally with my changes.
  • I have checked for any potential breaking changes.

Type of Change (Mandatory)

What kind of change does this PR introduce?
(Please check the relevant options)

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📄 Documentation update (changes to documentation only)
  • 🔧 Refactoring (no functional changes, code improvements)

Approval Checklist for Reviewers

Reviewers, please ensure:

  • The code is easy to understand and follows the project's coding standards.
  • All required documentation is updated or created.
  • The change is appropriately tested and validated.
  • There are no breaking changes (or they are clearly documented).

@zhiyizhu805 zhiyizhu805 changed the title AB# Feature/122 Create TaskItemRepository AB#122 Feature/122 Create TaskItemRepository Feb 2, 2025
Copy link
Collaborator

@yanxiaodi yanxiaodi left a comment

Choose a reason for hiding this comment

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

LGTM. 🚀

@zhiyizhu805 zhiyizhu805 merged commit 9c6f5cb into main Feb 2, 2025
@zhiyizhu805 zhiyizhu805 deleted the feature/122-create-task-repository branch February 2, 2025 09:24
@zhiyizhu805 zhiyizhu805 self-assigned this Feb 6, 2025
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