Example #1
0
 public LearningOutcome CreateLearningOutcome(CreateLearningOutcomeVM learningOutcome)
 => Map(learningOutcome, x => new LearningOutcome
 {
     Order           = x.Order,
     Content         = x.Name,
     MainObjectiveId = x.MainObjectiveId
 });
 public IHttpActionResult CreateLearningOutcomes(CreateLearningOutcomeVM learningOutcome)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState));
     }
     try
     {
         if (_learningOutcomeService.Create(ModelBuilder.CreateLearningOutcome(learningOutcome)))
         {
             return(Ok());
         }
         else
         {
             return(BadRequest());
         }
     }
     catch (Exception ex)
     {
         _loggingService.Write(ex);
         return(InternalServerError(ex));
     }
 }