public void Execute(CourseRequest course) { try { Course entity = CourseAdapter.GetEntity(course); _repository.Update(entity); } catch (Exception exc) { throw new CourseException("Error while update course!", exc); } }
public void Execute(CourseRequest course) { Course entity = CourseAdapter.GetEntity(course); try { _repository.AddNew(entity); } catch (Exception exc) { throw new StudentException("Eror while create new course!", exc); } }