using System; using System.Collections.Generic; using System.Linq; namespace bdAsegasa.db { public class PagoExtorno { public double NumeroGeneracion { get; set; } public DateTime FechaGeneracion { get; set; } public List Pagos { get; set; } = new List(); public double TotalLiquidacion => Math.Round(Pagos.Sum(x => (x.TotalRecibo ?? 0) * -1), 2, MidpointRounding.AwayFromZero); } }