示例#1
0
        public async Task <TPaTasaReferencial> Insert(TPaTasaReferencial tPaTasaReferencial)
        {
            await _unitOfWork.TPaTasaReferencialRepository.Add(tPaTasaReferencial);

            await _unitOfWork.SaveChangesAsync();

            return(tPaTasaReferencial);
        }
示例#2
0
        public async Task <TPaTasaReferencial> Update(TPaTasaReferencial tPaTasaReferencial)
        {
            var tasa = await GetById(tPaTasaReferencial.Id);

            if (tasa == null)
            {
                throw new Exception("Documento No existe");
            }

            _unitOfWork.TPaTasaReferencialRepository.Update(tasa);
            await _unitOfWork.SaveChangesAsync();

            return(await GetById(tPaTasaReferencial.Id));
        }
示例#3
0
 public void Update(TPaTasaReferencial entity)
 {
     _context.TPaTasaReferencial.Update(entity);
 }
示例#4
0
        public async Task Delete(decimal id)
        {
            TPaTasaReferencial entity = await GetById(id);

            _context.TPaTasaReferencial.Remove(entity);
        }
示例#5
0
 public async Task Add(TPaTasaReferencial entity)
 {
     await _context.TPaTasaReferencial.AddAsync(entity);
 }