public BorrowComment(string text, User owner, Borrow borrow) : this() { if (string.IsNullOrWhiteSpace(text)) { throw new ArgumentException("Comment text cannot be empty", nameof(text)); } this.Text = text; this.Owner = owner ?? throw new ArgumentNullException(nameof(owner)); this.OwnerId = owner.UserId; this.Borrow = borrow ?? throw new ArgumentNullException(nameof(borrow)); this.BorrowId = borrow.BorrowId; this.Creation = DateTime.Now; }
public BorrowScore(Score score, User owner, Borrow borrow) : this() { this.Punctuation = score ?? throw new ArgumentNullException(nameof(owner)); this.Owner = owner ?? throw new ArgumentNullException(nameof(owner)); this.Borrow = borrow ?? throw new ArgumentNullException(nameof(borrow)); }