示例#1
0
        public async Task ExecuteAsync()
        {
            var taxaDeJurosPadrao = new TaxaDeJurosPadrao();
            var taxaDeJurosBasica = new TaxaDeJurosBasica();
            await _taxaDeJurosContext.TaxasDeJuros.AddAsync(taxaDeJurosPadrao);

            await _taxaDeJurosContext.TaxasDeJuros.AddAsync(taxaDeJurosBasica);
        }
示例#2
0
        public void Execute()
        {
            var taxaDeJurosPadrao = new TaxaDeJurosPadrao(TaxaDeJurosConstants.ValorDaTaxaDeJurosPadrao);

            taxaDeJurosPadrao.Id = TaxaDeJurosConstants.IdDaTaxaDeJurosPadrao;
            _taxasDeJurosContext.TaxasDeJuros.Add(taxaDeJurosPadrao);

            var taxaDeJurosEspecial = new TaxaDeJurosEspecial(TaxaDeJurosConstants.ValorDaTaxaDeJurosEspecial);

            taxaDeJurosEspecial.Id = TaxaDeJurosConstants.IdDaTaxaDeJurosEspecial;
            _taxasDeJurosContext.TaxasDeJuros.Add(taxaDeJurosEspecial);

            _taxasDeJurosContext.SaveChanges();
        }