public async Task <CobValoresRetenciones> Insert(CobValoresRetenciones cobValoresRetenciones) { await _unitOfWork.CobValoresRetencionesRepository.Add(cobValoresRetenciones); await _unitOfWork.SaveChangesAsync(); return(cobValoresRetenciones); }
public async Task <CobValoresRetenciones> Update(CobValoresRetenciones cobValoresRetenciones) { var retencion = await GetById(cobValoresRetenciones.IdTransaccion); if (retencion == null) { throw new Exception("Documento No existe"); } _unitOfWork.CobValoresRetencionesRepository.Update(retencion); await _unitOfWork.SaveChangesAsync(); return(await GetById(cobValoresRetenciones.IdTransaccion)); }
public void Update(CobValoresRetenciones entity) { _context.CobValoresRetenciones.Update(entity); }
public async Task Delete(long id) { CobValoresRetenciones entity = await GetById(id); _context.CobValoresRetenciones.Remove(entity); }
public async Task Add(CobValoresRetenciones entity) { await _context.CobValoresRetenciones.AddAsync(entity); }