Closed callumjgill closed 5 months ago
Package | Line Rate | Branch Rate | Complexity | Health |
---|---|---|---|---|
PruneUrl.Backend.API | 28% | 0% | 12 | ❌ |
PruneUrl.Backend.Application.Commands | 100% | 100% | 6 | ✔ |
PruneUrl.Backend.Application.Exceptions | 100% | 100% | 2 | ✔ |
PruneUrl.Backend.Application.Implementation | 100% | 100% | 10 | ✔ |
PruneUrl.Backend.Application.Queries | 100% | 100% | 7 | ✔ |
PruneUrl.Backend.Application.Requests | 100% | 100% | 9 | ✔ |
PruneUrl.Backend.Domain.Entities | 100% | 100% | 3 | ✔ |
PruneUrl.Backend.Infrastructure.Database | 90% | 100% | 8 | ✔ |
PruneUrl.Backend.Infrastructure.IoC | 99% | 50% | 17 | ✔ |
Summary | 75% (236 / 314) | 70% (14 / 20) | 74 | ✔ |
Minimum allowed line rate is 50%
This PR introduces an improvement to the database the app uses by replacing Firebase DB with a PostgreSQL db. As a result, a lot of boilerplate code has been removed as only one Entity is now needed:
ShortUrl
. Using a relational DB solves several issues with Firebase DB, namely the abstraction leaks with the interfaces used to interact with the database.Rather than write several interfaces to interact with a Db layer, one interface
IDbContext
has been added which allows direct use of EF Core. EF Core is itself using a repository and unit of work pattern so no point adding more abstractions.Closes #68