public override void Load(ServiceRequestDocument document)
        {
            id      = new Id(document.Id);
            version = new Version(document.Version);

            _scheduledDate  = new ScheduledDate(document.ScheduledDate);
            _dueDate        = new DueDate(document.DueDate);
            _completionDate = new CompletionDate(document.CompletionDate);

            _clientId   = new Id(document.Client);
            _serviceId  = new Id(document.Service);
            _assignedTo = new Id(document.AssignedAgent);

            _state = document.State;
        }
 public ServiceRequestDocument(ScheduledDate scheduledDate,
                               Id clientId, Id serviceId, Id assignedTo,
                               DueDate dueDate, ServiceRequestState state,
                               CompletionDate completed,
                               Version version, Id id)
 {
     this.ScheduledDate  = scheduledDate ?? new ScheduledDate(DateTime.Now);
     this.Client         = clientId;
     this.Service        = serviceId;
     this.AssignedAgent  = assignedTo ?? Guid.Empty;
     this.DueDate        = dueDate ?? new DueDate(DateTime.Now.AddDays(2));
     this.CompletionDate = completed;
     this.State          = state;
     this.Version        = version;
     this.Id             = id;
 }
 public void Completed()
 {
     this._state          = ServiceRequestState.Complete;
     this._completionDate = new CompletionDate(DateTime.Today);
     UpdateVersion();
 }