public Release ScheduleRelease(ReleaseId newReleaseId, string name, string description, DateTime begins,
            DateTime ends)
        {
            Release release = new Release(this.TenantId, this.ProductId, newReleaseId, name, description, begins, ends);

            DomainEventPublisher.Instance.Publish(new ProductReleaseScheduled(release.TenantId, release.ProductId,
                release.ReleaseId, release.Name, release.Description, release.Begins, release.Ends));

            return release;
        }
        public void ScheduleFor(Release release)
        {
            AssertionConcern.NotNull(release, "Release must not be null.");
            AssertionConcern.Equals(this.TenantId, release.TenantId, "Release must be of same tenant.");
            AssertionConcern.Equals(this.ProductId, release.ProductId, "Release must be of same product.");

            if(this.IsScheduledForRelease && !this.ReleaseId.Equals(release.ReleaseId)) {
                this.UnscheduleFromRelease();
            }

            if(this.Status==BacklogItemStatus.Planned) {
                this.Status = BacklogItemStatus.Scheduled;
            }

            this.ReleaseId = release.ReleaseId;

            DomainEventPublisher.Instance.Publish(new BacklogItemScheduled(this.TenantId, this.BacklogItemId,
                release.ReleaseId));
        }