private async Task <string> ParseRazorTemplateFromResourceAsync <T>(string resourcePath, T model)
        {
            if (Engine.TemplateCache.Contains(resourcePath))
            {
                var template = Engine.TemplateCache.RetrieveTemplate(resourcePath).Template.TemplatePageFactory.Invoke();
                return(await Engine.RenderTemplateAsync(template, model));
            }

            var razorTemplate  = graphTemplateRepository.ReadResourceToString(resourcePath);
            var htmlFileOutput = await ParseAndCacheRazorTemplateAsync(resourcePath, razorTemplate, model);

            return(htmlFileOutput);
        }
        private string ParseRazorTemplateFromResource <T>(string resourcePath, T model)
        {
            var cached = Engine.Razor.IsTemplateCached(resourcePath, typeof(T));

            if (cached)
            {
                return(ParseCachedRazorTemplate(resourcePath, model));
            }

            var razorTemplate  = graphTemplateRepository.ReadResourceToString(resourcePath);
            var htmlFileOutput = ParseAndCacheRazorTemplate(resourcePath, razorTemplate, model);

            return(htmlFileOutput);
        }