public object Put(SaveCourse request) { var success = _courseManager.Update(request.Course); var issues = _messageBusService.Fetch().Select(m => m.Details); ; return new ServiceResult<Course> { Success = success, Result = request.Course, Errors = issues }; }
public object Post(SaveCourse request) { int id; var success = _courseManager.Create(request.Course, out id); if (success) request.Course.ID = id; var issues = _messageBusService.Fetch().Select(m => m.Details); ; return new ServiceResult<Course> { Success = success, Result = request.Course, Errors = issues }; }