/// <summary> /// Creates the specified employee. /// </summary> /// <param name="employee">The employee.</param> /// <param name="date">The date.</param> /// <param name="amount">The amount.</param> /// <param name="comment">The comment.</param> /// <param name="isActive">if set to <c>true</c> [is active].</param> /// <returns>BonusAggregate.</returns> public BonusAggregate Create(Employee employee, DateTime date, decimal amount, string comment = "", bool isActive = false) { return new BonusAggregate(employee, date, amount, comment, isActive, 0); }
/// <summary> /// Initializes a new instance of the <see cref="BonusAggregate"/> class. /// </summary> /// <param name="employee">The employee.</param> /// <param name="date">The date.</param> /// <param name="amount">The amount.</param> /// <param name="comment">The comment.</param> /// <param name="isActive">if set to <c>true</c> [is active].</param> /// <param name="bonusId">id of a bonus</param> internal BonusAggregate(Employee employee, DateTime date, decimal amount, string comment, bool isActive, int bonusId) { if (employee == null) throw new ArgumentNullException("Bonus", "Employee can not be null to create bonus instance"); Employee = employee; BonusId = bonusId; Date = date; Amount = amount; Comment = comment; IsActive = isActive; Ulc = ""; }