Ejemplo n.º 1
0
        public void ChangeAuthor(string firstName, string lastName)
        {
            AddDomainEvent(new BookChangeEvent(BookName));
            AddDomainEvent(new NewBookChangeEvent(BookName));

            Author = new BookAuthor(firstName, lastName);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public void ChangeAuthor(string firstName, string lastName)
 {
     Author = new BookAuthor(firstName, lastName);
 }