public override Debt Add(Debt entity) { var customer = _customerService.GetById(entity.CustomerId); if (customer == null) { return(null); } return(_debtRepository.Add(entity)); }
public override Debt Add(Debt item) { if (item == null) { throw new ArgumentNullException("item"); } if (item.Goal == null) { throw new ArgumentNullException("item", "Property item.Goal can't be Null."); } //if (item.Goal.OperationDetails == null) throw new ArgumentNullException("item", "Property item.Goal.Operation.OperationDetails can't be Null."); item.Code = base.CreateCode(item.Goal); _debtRepository.Add(item); //if (item.Goal.Notifications != null && item.Goal.Notifications.Any()) // _notificationService.Add(item.Goal); return(item); }
public long Add(Debt debt) { return(_debtRepository.Add(debt)); }