Example #1
0
 public async Task RenderAsync(ViewContext context)
 {
     await Task.Run(async() =>
     {
         var viewData = context.ViewData;
         await context.Writer.WriteAsync(await _renderer.Render(Path, context.ViewData.Model));
     });
 }
Example #2
0
 public async Task <string> RenderViewWithDataAsync(string view, object viewData)
 {
     return(await _renderer.Render(view, viewData));
 }