public FormPageModel(NavigationMenuModel menuModel, IEnumerable <Question> questions = null) : base(FORM_HEADER_TEXT, menuModel) { Questions = questions ?? new List <Question>(); Answers = Questions.Aggregate(new List <Answer>(), (A, Q) => A.Concat(Q.AnswerVariants.Select(V => new Answer() { question_id = Q.Id, variant_id = V.Id, selected = false })).ToList()); }
public GuestPageModel(NavigationMenuModel menuModel, IEnumerable <Review> reviews = null) : base(GUEST_HEADER_TEXT, menuModel) => Reviews = reviews ?? new List <Review>();
public HomePageModel(NavigationMenuModel menuModel, IEnumerable <Article> articles = null) : base(HOME_HEADER_TEXT, menuModel) => Articles = articles ?? new List <Article>();