Beispiel #1
0
        public static Company Create(CompanyNameValue name, string number)
        {
            Company company = new Company()
            {
                State  = EntityState.Added,
                Name   = name,
                Number = number
            };

            company.AddDomainEvent(new CompanyCreatedDomainEvent(name));
            return(company);
        }
Beispiel #2
0
 internal static Entities.Company CreateCompany(CompanyCreateRequest request)
 {
     return(Entities.Company.Create(CompanyNameValue.Create(request.Name),
                                    request.Number));
 }