title: Replacing UseMvc in .Net Core 3.0
body: <p>I'm trying to figure out how to properly replace <code>app.UseMvc()</code> code that use to be part .net core 2.2. The examples go so far as to tell me what are all the codes I can call but I'm not yet understanding which should I call. For example for my MVC Web Application I have the following:</p>
  
  <pre><code>public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
  {
      app.UseStatusCodePagesWithReExecute("/Error/Index");
      app.UseMiddleware&lt;ExceptionHandler&gt;();
      app.UseStaticFiles(new StaticFileOptions()
      {
          OnPrepareResponse = (context) =&gt;
          {
              context.Context.Response.GetTypedHeaders()
                  .CacheControl = new CacheControlHeaderValue
              {
                  MaxAge = TimeSpan.FromDays(30)
              };
          }
      });
  
      app.UseRouting();
      app.UseEndpoints(endpoints =&gt;
      {
          endpoints.MapRazorPages();
          endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
      });
  }
  </code></pre>
  
  <p>Before I would provide my routing inside the <code>UseMvc()</code> options. However now it seems I have to provide it inside <code>MapControllerRoute</code> But the examples always seem to also call <code>MapRazorPages()</code>. Do I need to call both or am I suppose to call just one? What is the actual difference between the two and how do I setup a default controller and a default action?</p>