Files
WebNovelPortal/DBConnection
littlefoot e4529e11c0
All checks were successful
continuous-integration/drone/push Build is passing
Fixed dockerfiles and fixed chapter upserts
2022-07-17 10:16:32 -04:00
..

DBConnection

Providers

Currently AppDbContext can support:

  • Sqlite (default)
  • PostgresSql

The startup project should specify a 'DatabaseProvider' configuration key and provide an appropriate connection string

Repositories

Repositories added into the DBConnection.Repositories namespace and assignable (implementing) IRepository will be dependency injected.

Repositories extending a non-generic interface that also implements IRepository (or some descendant interface) will be DI'd as an implementation of that interface.

As an example, AuthorRepository implements IAuthorRepository which implements IRepository which implements IRepository. Therefore, Author will get added as an implementation of IAuthorRepository.