.NET 6 using Onion Architecture- Part 4- Test-driving the data access layer – PwP Episode 8

Challenges

  • Ensuring reliable data access while maintaining testability.
  • Avoiding tightly coupled code in the data access layer.
  • Balancing test coverage with development efficiency.

Solutions

  • Applying test-driven development (TDD) to the data access layer.
  • Using Onion Architecture principles to decouple data logic.
  • Leveraging .NET 6 tools for efficient test creation.

Benefits

  • Higher confidence in data access reliability.
  • Improved code quality through maintainable and decoupled layers.
  • Streamlined testing processes for faster development cycles.

In this episode, Jeffrey is going to dive deeper into using .NET 6 with Onion Architecture or using Onion Architecture and applying it to .NET 6.

He is going to build upon the existing application that has been started in previous episodes to create church bulletin software that can print PDFs of the bulletins for a Sunday morning worship service and drive digital signage on a billboard or screen of any kind for the announcements or events happening.

Code sample: https://github.com/jeffreypalermo/onion-architecture-dotnet-6/tree/issue-4-data-access-handlers-with-tests-and-code-coverage

The application has already been mapped with entity framework and now you are going to build upon that to create queries and the actual usage of entity framework. It will have statements, filtering, and build the data access layer.

You will be watching Jeffrey code and understand how he thinks about things. He intentionally is working sequentially to help introduce helper classes, as they are needed in the application, to understand and see what is being done.