コード例 #1
0
        public void Add(LessonPresentationViewModel lesson)
        {
            var texto = _helperService.CreateLessonWithParagraph(lesson.Text, 55);

            _bus.SendCommand(new LessonPresentationAddCommand(
                                 lesson.Name, texto, lesson.Category, lesson.SpeedReference,
                                 lesson.TimeReference, lesson.PrecisionReference, lesson.FontSize,
                                 _user.GetUderId()));
        }
コード例 #2
0
        public IActionResult Create(LessonPresentationViewModel lessonPresentationViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(lessonPresentationViewModel));
            }
            _lessonPresentationAppService.Add(lessonPresentationViewModel);

            ViewBag.SuccessCreated = GetMessageCreate(lessonPresentationViewModel);
            return(View(lessonPresentationViewModel));
        }