public AgentDocument(String firstName, String lastName, Version version, Id id) { this.FirstName = firstName; this.LastName = lastName; this.Id = id; this.Version = version; }
public LoginSessionDocument(Id sessionId, Guid userId, DateTime createDt, DateTime?logout, Version version) { SessionId = sessionId; UserId = userId; CreationTime = createDt; LogoutTime = logout; Version = version; }
public override void Load(UserDocument document) { id = new Id(document.Id); version = new Version(document.Version); username = document.Username; email = document.Email; passwordHash = document.PasswordHash; createDt = document.CreationTime; }
public UserDocument(Id userId, String username, String email, String hash, DateTime createDate, Version version) { Id = userId; Username = username; Email = email; PasswordHash = hash; CreationTime = createDate; Version = version; }
public CustomerDocument(Id id, Version version, string name, Address billingAddress, Address shippingAddress, Contact contact) { Id = id; Version = version; Name = name; BillingAddress = billingAddress; ShippingAddress = shippingAddress; Contact = contact; }
public ServiceRequest(ScheduledDate scheduledDate, Id clientId, Id serviceId, Id assignedTo, DueDate dueDate, Version version, Id id) : base(id, version) { this._scheduledDate = scheduledDate; this._clientId = clientId; this._serviceId = serviceId; this._dueDate = dueDate; this._assignedTo = assignedTo; }
public Version Lock(Version expectedVersion) { if (expectedVersion != version) { throw new InvalidOperationException(string.Format("The version is out of date and cannot be updated. Expected {0} was {1}", expectedVersion, version)); } version++; return(version); }
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 Agent(String firstName, String lastName, Version version, Id id) : base(id, version) { this.FirstName = firstName; this.LastName = lastName; }
public User(String username, String email, String hash, DateTime creationTime, Version version, Id id) : base(id, version) { this.username = username; this.email = email; this.passwordHash = hash; this.createDt = creationTime; }
protected AggregateRoot(Id id, Version version) { this.id = id; this.version = version; }
public LoginSession(Id user, DateTime created, Version version, Id id) : base(id, version) { this.user = user; this.created = created; }
public Task(Id agent, DueDate dueOn, string task, Version version, Id id) : base(id, version) { this._assignedTo = agent; this._dueOn = dueOn; this._task = task; }