Expose the Controller Action that returns the file result directly as a route.
Having it as a MVC Function is counter intuitive and adds a lot of Composite overhead resolving the page, rendering and what not for no reason since you would then just discard all the rendered content, clear the response and return a file instead.
Having it as a MVC Function is counter intuitive and adds a lot of Composite overhead resolving the page, rendering and what not for no reason since you would then just discard all the rendered content, clear the response and return a file instead.