var reportPartial = @$"
<h1>{report.Name}</h1>
<table>
{string.Join('\n', report.Items.Select(reportItem => @$"
<tr>
<td>{reportItem.Col1}</td>
<td>{reportItem.Col2}</td>
</tr>
"))}
</table>
";
In more complex views or reuse scenarios, I'd push the inner interpolation loop to a method.This is how I've been building my .NET web apps for the last ~3 years. @+$ = PHP in C# as far as I'm concerned.