Understanding Layers and Dependency Injection in Effect
Hey I just found out about effect and read the docs and think it truly is amazing
I was wondering if I understood its Layers and dependency injection correctly.
So I can create a DBLayer which holds a db client.
Every Service (and its methods) that depend on that DBLayer will have access to the client.
Now if I want to chain service methods in a db transaction context i could provide a different DBLayer which doesn't serve the default db client but instead a dbTransaction client.
And I could serve different DbTransactionLayers on a request basis.
Right?
I was wondering if I understood its Layers and dependency injection correctly.
So I can create a DBLayer which holds a db client.
Every Service (and its methods) that depend on that DBLayer will have access to the client.
Now if I want to chain service methods in a db transaction context i could provide a different DBLayer which doesn't serve the default db client but instead a dbTransaction client.
And I could serve different DbTransactionLayers on a request basis.
Right?
