public static Project From(EntityId id, ProjectName name, ProjectCode code, DateAndTime startDate, Money budget, EntityId clientId, Email owner, ProjectStatus status, ServiceOrderNumber orderNumber, Version version) { var project = new Project(id, name, code, startDate, budget, clientId, owner, status, orderNumber, version); var validator = new ProjectValidator(); project.SetValidationResult(validator.Validate(project)); return(project); }
public static Project NewRequest(EntityId id, ProjectName name, ProjectCode code, DateAndTime startDate, Money budget, EntityId clientId) { return(From(id, name, code, startDate, budget, clientId, Email.Empty(), ProjectStatus.Default(), ServiceOrderNumber.Empty(), Version.New())); }
public static Project Empty() { return(From(EntityId.Empty(), ProjectName.Empty(), ProjectCode.Empty(), DateAndTime.Empty(), Money.Zero(), EntityId.Empty(), Email.Empty(), ProjectStatus.Default(), ServiceOrderNumber.Empty(), Version.Empty())); }