/// <summary> /// Default constructor assigning new <see cref="Guid"/> becuase entity live also un-persisted. /// </summary> public Rental(Book book, string rentee) { AssertUtils.IsTrue(book != null); AssertUtils.IsTrue(rentee != null); Id = new Guid(); Book = book; Rentee = rentee; StartOfRental = DateTime.UtcNow; }
public void AddBook(Book book) { books.Add(book); }