Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 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()));
 }
Esempio n. 3
0
 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()));
 }