Creating an Application from Scratch using .NET Core and Angular — Part 3

  • Allows the isolation of the business layer (the domain layer) of the database layer (the infrastructure layer).
  • Allows the change of a database in the future (if necessary) without having much impact in the system
  • Allow loosely coupled between classes
  • You have all the code for access the database in one place
  • Make easy to implement unit test
  • Provide a flexible architecture
  • Easy to maintain
  • GetAll — this method we are going to override because we need to add the category name in the result
  • GetById — this method will also be overridden to allow returning the category name
  • GetBooksByCategory — this method will receive the id of a category as a parameter, and will return all books with this category id
https://github.com/henriquesd/BookStore

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store