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
I'm using Nancyfx and MediatR
In my nancy module (a cousin of mvc controller)
There's some logic done by the Module itself
for example input-model-validation, response object manipulation, LoginAndRedirect, etc.
these are extensions of the nancy Module object
Is this what a normal Nancy module looks like? There's a lot of different concerns going on in one POST operation.
I tend to have my "request handler" in MVC applications be more or less a domain concern. The input is the bound form object, and the output is some result. Something like "ApproveInvoice -> Invoice" and you could then take that result and redirect appropriately.
For the other ancillary concerns, I either use filters, or a mediator pipeline that I create as a decorator around all my handler.
Hi
I'm using Nancyfx and MediatR
In my nancy module (a cousin of mvc controller)
There's some logic done by the Module itself
for example input-model-validation, response object manipulation, LoginAndRedirect, etc.
these are extensions of the nancy Module object
Common usage example: https://github.com/NancyFx/DinnerParty/blob/master/src/Modules/AccountModule.cs
Is it a good practice to move that logic into the Request Handler which will return a nancy Response object?
thanks allot :-)
The text was updated successfully, but these errors were encountered: