예제 #1
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);
        }
예제 #2
0
 public void ChangeAuthor(string firstName, string lastName)
 {
     Author = new BookAuthor(firstName, lastName);
 }