示例#1
0
        public static Customer Create(string name)
        {
            var fact = new CustomerCreatedFact
                       {
                           AggregateRootId = Guid.NewGuid(),
                           Name = name,
                       };

            var customer = new Customer();
            customer.Append(fact);
            customer.Apply(fact);
            return customer;
        }