public static Case Create(CaseId id, string subject, string description) { var @event = new CaseCreated(subject, description); var @case = new Case(id, @event); @case.Append(id.Value, CaseCreated.EventType, @event); return(@case); }
private Case(CaseId id, CaseCreated @event) : base(id) { Subject = @event.Subject; Description = @event.Description; CaseNumber = null; Status = CaseStatus.InProgress; }