// Update course public static CourseUpdate.Response Handle(IRepository repository, CourseUpdate.Request request) { var container = CourseFactory.CreatePartial(request.CommandModel.CourseID).Modify(request.CommandModel); var validationDetails = repository.Save(container); return(new CourseUpdate.Response(validationDetails)); }
// Delete course public static CourseDelete.Response Handle(IRepository repository, CourseDelete.Request request) { var course = CourseFactory.CreatePartial(request.CommandModel.CourseId); var container = course.Delete(); repository.Save(container); return(new CourseDelete.Response()); }