Ejemplo n.º 1
0
        public async Task CalculateAndInsertNewInfo()
        {
            List <InternalDebtModel> internalDebts = _context.InternalDebtsAPI.ToList();
            InternalIncreaseModel    internalModel = _converter.ConvertInternalFromBaseModel(CalculateIncreaseModel(internalDebts));

            _context.InternalDebtsInfo.Add(internalModel);

            List <ExternalDebtModel> externalDebts = _context.ExternalDebtsAPI.ToList();
            ExternalIncreaseModel    externalModel = _converter.ConvertExternalFromBaseModel((CalculateIncreaseModel(externalDebts)));

            _context.ExternalDebtsInfo.Add(externalModel);

            _context.SaveChanges();
        }