You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, everyone. now i confuse about how to use mediator. normally, i use one to one(1 command/query with 1 handler). but last few days ago. i have a quest about how use interface IMediator in handler can we use or not ? for example as below
we have 3 query as below
queryA
queryB
queryC
we use all query in side new hanlder
queryAllHandler
var a = _mediator.Send(queryA);
var b = _mediator.Send(queryB);
var b = _mediator.Send(queryC);
return new All{ a, b, c }
we use all query in controller
method: queryAll in controller
var a = _mediator.Send(queryA);
var b = _mediator.Send(queryB);
var b = _mediator.Send(queryC);
return new All{ a, b, c }
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, everyone. now i confuse about how to use mediator. normally, i use one to one(1 command/query with 1 handler). but last few days ago. i have a quest about how use interface IMediator in handler can we use or not ? for example as below
we have 3 query as below
queryA
queryB
queryC
queryAllHandler
method: queryAll in controller
which one we choose use ?
Beta Was this translation helpful? Give feedback.
All reactions