Skip to content

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