我想從T4MVC ActionResult獲取以執行該調用並從我的EmailService類中的靜態函數中獲取整個字符串。任何幫助,將不勝感激t4mvc actionresult轉換爲字符串
像這樣的事情
static string ExecuteAction(ActionResult result)
{
/* Code goes here */
}
所以,我可以這樣調用
public static class EmailService
{
public static bool SendWelcomeEmail(string name, string email)
{
var message = ExecuteAction(MVC.Emails.WelcomeEmail(name, email));
/* Other code */
}
}
什麼是你想達到什麼目的?應該返回什麼字符串? – 2011-12-14 23:53:05
從視圖設計和建立電子郵件模板 – Kyle 2011-12-14 23:58:23