예제 #1
0
파일: Book.cs 프로젝트: MiCake/MiCake
        public void ChangeAuthor(string firstName, string lastName)
        {
            AddDomainEvent(new BookChangeEvent(BookName));
            AddDomainEvent(new NewBookChangeEvent(BookName));

            Author = new BookAuthor(firstName, lastName);
        }
예제 #2
0
파일: Book.cs 프로젝트: wrsxinlang/MiCake
        public Book(string bookName, string authorFirstName, string authorLastName)
        {
            if (string.IsNullOrEmpty(bookName))
            {
                throw new SoftlyMiCakeException("书名不能为空");
            }

            Id       = Guid.NewGuid();
            BookName = bookName;
            Author   = new BookAuthor(authorFirstName, authorLastName);
        }
예제 #3
0
파일: Book.cs 프로젝트: wrsxinlang/MiCake
 public void ChangeAuthor(string firstName, string lastName)
 {
     Author = new BookAuthor(firstName, lastName);
 }