Example #1
0
        public IActionResult AddLecture(AddLectureViewModel model)
        {
            var lecture = new Lecture()
            {
                Place = model.Place, Date = model.Date, Description = model.Description
            };

            repository.AddLecture(repository.GetGroupById(model.GroupID), lecture);
            return(LocalRedirect(model.returnUrl));
        }