Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Withdrawal method #7

Open
varghesep opened this issue Jul 3, 2015 · 2 comments
Open

Withdrawal method #7

varghesep opened this issue Jul 3, 2015 · 2 comments

Comments

@varghesep
Copy link

I think the method PatchWithdrawal should return an object which should contain the account and balance. Or another GET method to return an account which shows the balance.

Code snippet: public async Task PatchWithdrawal(Withdraw request)

Do you have any thoughts on where to incorporate this?

@Horusiath
Copy link
Owner

The essence of CQRS is to separate reads and writes. For this reason I think it's not necessary to return an updated read model as result of the request. It can be send separately i.e. using SignalR hubs connected to actor system.

But of course, when your design represents another characteristics, you can simply send updated part of the read model back to command sender.

@varghesep
Copy link
Author

I think it make sense to call PatchWithdrawal but not return the balance. We can have another message sent to an actor to return the Balance.

I assume the Account (public class Account : AggregateRoot) actor is purely for the write purpose.

If so, is **AccountHistoryView ** the actor where that message can be sent? Or it should be the AccountService which is not complete yet? Or should be another actor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants