Async injection
summary
Claims a concrete pattern: move impure DB calls to the edge, change repository reads to produce Task or collections and inject decision logic into the async monad instead of making domain methods async. Shows C# code: add Select/SelectMany for Task/Lazy, implement a lightweight Maybe<T> with Match, use Select to map reservations and defer repository.Create to the controller. Result: business logic stays deterministic and synchronous; I/O stays async at the boundary, and the examples compile and run.
AI-written summary · about
chapters (23)
- 0:00Start
- 3:21Dependency Injection
- 3:42Constructor Injection
- 5:23Domain Driven Design
- 8:05The Dependency Inversion Principle
- 8:43Leaky Abstraction
- 10:27Post Method
- 12:37How Do You Get the Value out of My Monette
- 13:31The Xy Problem
- 15:35What a Monad Is
- 15:50What a Functor Is
- 21:16Add a Select Method as an Extension Method
- 24:00Query Syntax
- 29:06Unit Containers
- 29:20Semi Containers
- 33:19Constructor Overload
- 34:57Structure Preserving Map
- 41:41Aggregate Methods
- 44:31How Do I Combine Dependency Injection with a Sink and a Weight without Leaky Abstractions
- 45:51Impure Operation
- 50:07Move Repository Create to the Post Method
- 52:36Match Method
- 55:43Compiler Warning








