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

Feature/inverting persistence dependency #3

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Innokmm
Copy link

@Innokmm Innokmm commented Dec 9, 2021

As per #2

Summary of changes:

  • Removed persistence dependency from Domain layer by introducing IApplicationDbContext and IDealSet interfaces
  • Added db seeding to get testing data in swagger;

A couple of notes

  • IApplicationDbContext and IDealSet interfaces could be combined into one port, but I'd prefer to make iterative steps, just to demonstrate the dependency inversion of the current implementation.

  • I've changed DealDomain from using Generic('T') to specific Deal class, because IMHO, 'Deal' is what DealDomain should be interested in, right? The new Port above can be also implemented by using Generics, but need to change the unit tests first, and tidy up the code before that step, which is out of the scope. As I mentioned before this PR is for reversing dependency demo.

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.

1 participant