Closed sreejith-ms closed 3 years ago
Hi @sreejith-ms
We just need to live with it. I mean the ideal solution is to count users in the application layer and provide this count to the domain. But sometimes for performance reasons, this is not an optimal solution and then you can use method injection. I don't like async/await in Domain Model so I would rather stick with sync and change to async if a performance issue will appear.
Thanks @kgrzybek
The method
CountUsersWithLogin
inIUsersCounter
is synchronous, how to make itasync
?I have introduced
IsBrokenAsync
to resolve this and it will introduceasync
methods in the domain model. This seems to be a bad idea after reading this domain model purity article. Is this the reason behind the methodCountUsersWithLogin
created as synchronous?Any thoughts on how to handle this?