evolutionary-architecture / evolutionary-architecture-by-example

Navigate the complex landscape of .NET software architecture with our step-by-step, story-like guide. Unpack the interplay between modular monoliths, microservices, domain-driven design, and various architectural patterns. Go beyond the one-size-fits-all solutions and understand how to blend these approaches based on your unique needs.
MIT License
1.66k stars 212 forks source link

Use TimeProvider in modular monolith #105

Closed meaboutsoftware closed 7 months ago

meaboutsoftware commented 7 months ago

This PR contains changes related to handling date times in modular monolith. Till now, it was a combination of custom ISystemClock (custom interface that we used in .NET 7 but after migration to .NET 8 it is no longer needed as there is a TimeProvider abstraction that is built-in) and direct access of DateTimeOffset.UtcNow or .Now.