public async Task <CobSysfile> Insert(CobSysfile cobSysfile) { await _unitOfWork.CobSysfileRepository.Add(cobSysfile); await _unitOfWork.SaveChangesAsync(); return(cobSysfile); }
public async Task <CobSysfile> Update(CobSysfile cobSysfile) { var sysfile = await GetById(cobSysfile.Id); if (sysfile == null) { throw new Exception("Registro No existe"); } _unitOfWork.CobSysfileRepository.Update(sysfile); await _unitOfWork.SaveChangesAsync(); return(await GetById(cobSysfile.Id)); }
public async Task Delete(short id) { CobSysfile entity = await GetById(id); _context.CobSysfile.Remove(entity); }
public void Update(CobSysfile entity) { _context.CobSysfile.Update(entity); }
public async Task Add(CobSysfile entity) { await _context.CobSysfile.AddAsync(entity); }