Пример #1
0
        public SelectQuestion(string title, Section section)
        {
            ThrowIfTitleInvalid(title);

            Title = title;
            Section = section;
        }
Пример #2
0
        public SectionModel CreateSection([ModelBinder(typeof(EntityModelBinderProvider))]Course course, Dictionary<string,string> spec)
        {
            if (course == null && !spec.ContainsKey("title"))
                throw new ArgumentNullException();

            var section = new Section(spec["title"], course);

            _sectionRepository.Insert(section);

            return  _mapper.Map<SectionModel>(section);
        }
 public MultipleSelectQuestion(string title, Section section)
     : base(title, section)
 {
     Type = "Multiple";
 }
 public SingleSelectQuestion(string title, Section section)
     : base(title, section)
 {
     Type = "Single";
 }