Update SampleAsyncActionFilter.cs (#4259)
The existing code sample implies that the user can access the result of the action method in `context.Result`, but that is not the case. User needs to capture the result of the `next` delegate in order to access this info.pull/4298/head
parent
f8f6b5934b
commit
669347ee62
|
@ -10,8 +10,8 @@ namespace FiltersSample.Filters
|
|||
ActionExecutionDelegate next)
|
||||
{
|
||||
// do something before the action executes
|
||||
await next();
|
||||
// do something after the action executes
|
||||
var resultContext = await next();
|
||||
// do something after the action executes; resultContext.Result will be set
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue