From 4d392ae352d47148962a0dcebd4d72e7fde122e8 Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 15 Oct 2023 21:50:37 -0500 Subject: [PATCH] Update RazorTemplateRenderingEngine.cs --- .../Abp/TextTemplating/Razor/RazorTemplateRenderingEngine.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.TextTemplating.Razor/Volo/Abp/TextTemplating/Razor/RazorTemplateRenderingEngine.cs b/framework/src/Volo.Abp.TextTemplating.Razor/Volo/Abp/TextTemplating/Razor/RazorTemplateRenderingEngine.cs index 2e053bb8a9..485ca44121 100644 --- a/framework/src/Volo.Abp.TextTemplating.Razor/Volo/Abp/TextTemplating/Razor/RazorTemplateRenderingEngine.cs +++ b/framework/src/Volo.Abp.TextTemplating.Razor/Volo/Abp/TextTemplating/Razor/RazorTemplateRenderingEngine.cs @@ -116,8 +116,8 @@ public class RazorTemplateRenderingEngine : TemplateRenderingEngineBase, ITransi { var compiledViewProvider = scope.ServiceProvider.GetRequiredService(); var assembly = await compiledViewProvider.GetAssemblyAsync(templateDefinition); - var templateType = assembly.GetType(AbpRazorTemplateConsts.TypeName); - var template = (IRazorTemplatePage)Activator.CreateInstance(templateType); + var templateType = assembly.GetType(AbpRazorTemplateConsts.TypeName)!; + var template = (IRazorTemplatePage)Activator.CreateInstance(templateType)!; var modelType = templateType .GetInterfaces()