Is it possible to retrieve controller's action result from .NET Core middleware?
问题 public class UsersController : APIControllerBase { public UsersController() { } public Client Get() { return new Client() { ClientID = 1, // LastUpdate = I want to update this field in middleware }; } public Client Get(int id) { return new Client() { ClientID = id // LastUpdate = I want to update this field in middleware }; } } public class SetClientLastUpdateMiddleware { private readonly RequestDelegate next; public SetClientLastUpdateMiddleware(RequestDelegate next) { this.next = next; }