public void RemoveCarryOver(string fundingLineCode) { Guard.IsNullOrWhiteSpace(fundingLineCode, nameof(fundingLineCode), "Funding Line Id cannot be missing"); CarryOvers ??= new List <ProfilingCarryOver>(); CarryOvers = CarryOvers.Except(CarryOvers.Where(_ => _.FundingLineCode == fundingLineCode)) .ToList(); }
public decimal?GetCarryOverTotalForFundingLine(string fundingLineCode) => CarryOvers?.Where(_ => _.FundingLineCode == fundingLineCode).Sum(_ => _.Amount);