Пример #1
0
 public static void Seed(ApplicationContext context)
 {
     context.AddQuestion(new Question
     {
         Text             = "Введите имя",
         QuestionTypeEnum = QuestionTypeEnum.QuestionString
     })
     .AddQuestion(new Question
     {
         Text             = "Введите возраст",
         QuestionTypeEnum = QuestionTypeEnum.QuestionInt
     })
     .AddQuestion(new Question
     {
         Text             = "Введите пол",
         QuestionTypeEnum = QuestionTypeEnum.QuestionSexEnum
     })
     .AddQuestion(new Question
     {
         Text             = "Введите дату рождения",
         QuestionTypeEnum = QuestionTypeEnum.QuestionDateTime
     })
     .AddQuestion(new Question
     {
         Text             = "Введите семейное положение",
         QuestionTypeEnum = QuestionTypeEnum.QuestionMaritalStatusEnum
     })
     .AddQuestion(new Question
     {
         Text             = "Любите ли вы программировать",
         QuestionTypeEnum = QuestionTypeEnum.QuestionBool
     });
     context.SaveChanges();
 }