Mvc.RenderViewToString Dotnet core 3.1 console application example rendering Razor views. For a description, see this blog post: https://codernr.github.io/posts/render-razor-view-from-a-dotnet-core-3-console-app