public async Task <string> RenderGenericView(BaseTemplateModel model, string viewName, string viewDirectory)
        {
            var tplName = viewName + "ViewTemplate";
            var content = await ViewRenderService.RenderToStringAsync(Path.Combine(TplDir, tplName), model);

            return(await WriteAndGetViewName(content, viewDirectory, viewName));
        }
Beispiel #2
0
        public void SendMail(BaseTemplateModel model)
        {
            Email mail = TemplateEngine.Execute(Enum.GetName(typeof(EmailTemplateType), model.TemplateName), model);

            Sender.Send(mail);
        }