Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 internal static Entities.Company CreateCompany(CompanyCreateRequest request)
 {
     return(Entities.Company.Create(CompanyNameValue.Create(request.Name),
                                    request.Number));
 }