diff --git a/Lombiq.Vsix.Orchard/Services/DependencyInjector/DependencyInjector.cs b/Lombiq.Vsix.Orchard/Services/DependencyInjector/DependencyInjector.cs index cbba2cf..bcb1c70 100644 --- a/Lombiq.Vsix.Orchard/Services/DependencyInjector/DependencyInjector.cs +++ b/Lombiq.Vsix.Orchard/Services/DependencyInjector/DependencyInjector.cs @@ -92,7 +92,8 @@ public string GetExpectedClassName(Document document) // We should never get an exception here. This is just to ensure we access DTE on the main thread and get // rid of the VSTHRD010 violation. Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread(); - return Path.GetFileNameWithoutExtension(document.FullName); + return Path.GetFileNameWithoutExtension(document.FullName) + .Replace(".cshtml", "Model"); // Handle Razor Pages } private static void GetCodeLines(DependencyInjectionContext context)