예제 #1
0
파일: UserAccount.cs 프로젝트: nootn/ooto
        public static UserAccount Create(string name)
        {
            var fact = new UserCreatedFact {Name = name, AggregateRootId = Guid.NewGuid()};

            var userAccount = new UserAccount();
            userAccount.Append(fact);
            userAccount.Apply(fact);

            return userAccount;
        }
예제 #2
0
파일: UserAccount.cs 프로젝트: nootn/ooto
 public void Apply(UserCreatedFact fact)
 {
     Id = fact.AggregateRootId;
     Name = fact.Name;
 }