public async Task <TPaTasaReferencial> Insert(TPaTasaReferencial tPaTasaReferencial) { await _unitOfWork.TPaTasaReferencialRepository.Add(tPaTasaReferencial); await _unitOfWork.SaveChangesAsync(); return(tPaTasaReferencial); }
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)); }
public void Update(TPaTasaReferencial entity) { _context.TPaTasaReferencial.Update(entity); }
public async Task Delete(decimal id) { TPaTasaReferencial entity = await GetById(id); _context.TPaTasaReferencial.Remove(entity); }
public async Task Add(TPaTasaReferencial entity) { await _context.TPaTasaReferencial.AddAsync(entity); }