title: How to get Action and Controller name in ASP.Net Core MVC app?
body: <p>How to get <code>Action</code> and <code>Controller</code> names in <code>ASP.Net MVC Core RC1</code> Application in <code>Startup.cs</code>?</p>
  
  <p>I want to create a middleware and log the information (I want to Log detailed response to my Database, so I need Action and Controller info.) after following code in <code>configure</code> method of <code>startup.cs</code> - </p>
  
  <pre><code> app.UseMvc(routes =&gt;
  {
       routes.MapRoute(
              name: "default",
              template: "{controller=User}/{action=Index}/{id?}");
   });
  
  //Want to get Action and controller names here..
  </code></pre>