來自Twilio的Ricky在這裏。
我們組建了一個C#教程,這個確切的使用情況下,我想和大家分享: https://www.twilio.com/docs/tutorials/walkthrough/automated-survey/csharp/mvc
有一個簡單的配置,可以讓你設置你要問的所有調查問題:
protected override void Seed(AutomatedSurveysContext context)
{
context.Surveys.AddOrUpdate(
survey => new { survey.Id, survey.Title },
new Survey { Id = 1, Title = "Twilio" });
context.SaveChanges();
context.Questions.AddOrUpdate(
question => new { question.Body, question.Type, question.SurveyId },
new Question
{
Body = "Hello. Thanks for taking the Twilio Developer Education survey. On a scale of 0 to 9 how would you rate this tutorial?",
Type = QuestionType.Numeric,
SurveyId = 1
},
new Question
{
Body = "On a scale of 0 to 9 how would you rate the design of this tutorial?",
Type = QuestionType.Numeric,
SurveyId = 1
},
new Question
{
Body = "In your own words please describe your feelings about Twilio right now? Press the pound sign when you are finished.",
Type = QuestionType.Voice,
SurveyId = 1
},
new Question
{
Body = "Do you like my voice? Please be honest, I dislike liars.",
Type = QuestionType.YesNo,
SurveyId = 1
});
context.SaveChanges();
}
好的,很酷。過去我使用過SurveyMonkey。之前沒有聽說過Twilio,所以我會研究它。 – TomK 2011-05-19 17:32:49
Pow。 Twilio看起來非常好。我喜歡他們有一個C#助手庫。現在深入挖掘... – TomK 2011-05-19 17:36:09