This repo demonstrates how to use Razor to create HTML Email templates utilizing Layouts, Partials, and Razor Class Libraries.
Walkthrough blog post here: https://scottsauber.com/2018/07/07/walkthrough-creating-an-html-email-template-with-razor-and-razor-class-libraries-and-rendering-it-from-a-net-standard-class-library/