public ActionResult Edit(CourseObjectiveInputModel model)
        {
            if (model != null && ModelState.IsValid)
            {
                var currentUserId  = this.UserProfile.Id;
                var updatedArticle = this.Mapper.Map <CourseObjective>(model);

                this.objectives.Update(model.Id, updatedArticle);

                return(this.RedirectToAction("CourseObjective", "School", new { area = "", id = model.Id }));
            }

            return(this.View(model));
        }
        public ActionResult Edit(CourseObjectiveInputModel model)
        {
            if (model != null && ModelState.IsValid)
            {
                var currentUserId = this.UserProfile.Id;
                var updatedArticle = this.Mapper.Map<CourseObjective>(model);

                this.objectives.Update(model.Id, updatedArticle);

                return this.RedirectToAction("CourseObjective", "School", new { area = "", id = model.Id });
            }

            return this.View(model);
        }
        public ActionResult Create(CourseObjectiveInputModel model)
        {
            if (model != null && ModelState.IsValid)
            {
                var currentUserId = this.UserProfile.Id;
                var newArticle    = this.Mapper.Map <CourseObjective>(model);

                newArticle.CreatorId = currentUserId;

                var result = this.objectives.Create(newArticle);

                return(this.RedirectToAction("CourseObjective", "School", new { area = "", id = result }));
            }

            return(this.View(model));
        }
        public ActionResult Create(CourseObjectiveInputModel model)
        {
            if (model != null && ModelState.IsValid)
            {
                var currentUserId = this.UserProfile.Id;
                var newArticle = this.Mapper.Map<CourseObjective>(model);

                newArticle.CreatorId = currentUserId;

                var result = this.objectives.Create(newArticle);

                return this.RedirectToAction("CourseObjective", "School", new { area = "", id = result });
            }

            return this.View(model);
        }