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

Microsoft.Data.Sqlite (if you want to use the SQLite In-Memory provider)
Microsoft.EntityFrameworkCore.Sqlite (if you want to use the SQLite In-Memory provider)
Microsoft.EntityFrameworkCore.InMemory (if you want to use the EF Core In-Memory provider)
Microsoft.EntityFrameworkCore.Sqlite
  • Repository — This is an abstract and generic class with the generic methods to execute the basic operation (CRUD and search). All other Repository classes inherit from this base class
  • CategoryRepository — This class does not have any specific method, it only uses the methods from the base class (the Repository class)
  • BookRepository — This class override some methods from the base class, like GetAll and GetById, and also has two other methods, the GetBooksByCategory and SearchBookWithCategory
  • GetAll
  • GetById
  • GetBooksByCategory
  • SearchBookWithCategory
  • The method returns a list of books when some book exists
  • The method returns an empty list of Book when no books exist
  • The method returns a list of Book with the correct values when books exist
  • The method returns the searched book when book the searched Id exists
  • The method returns null when book with the searched Id does not exist
  • The method returns Book with the correct value when the book with the searched Id exists
  • The method returns a list of Book when books with searched categoryId exist
  • The method returns an empty list when no book with searched categoryId does not exist
  • The method return books with searched categoryId when the book with the searched category exists
  • The method returns one book when one book with searched value exists
  • The method returns a list of Book when book with searched value exists
  • The method returns an empty list when books with searched value do not exist
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
Henrique Siebert Domareski

Henrique Siebert Domareski

I've been working with software development with .NET since 2011, and love programming and solve problems using clean code particles.