ASP.NET MVC - controller action method from console application?

I'm not one to try to recommend something other than what you're asking to do, but I agree with Wyatt, the goal seems a little on the sticky side, and at best is going to create some code smell. If you simply need to save the rendered output to a file, I think it'd be easier to have an app service that gets called when you need to do the save, likely from the controller. In that event, you'd have access to a current HttpContext, Routes, etc.

It is going to be tricky to get stuff to render without hosting the app in something as there is no HttpContext, etc.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions