public IActionResult Put(int id, Skp data) { using (var db = new OcphDbContext(this._dbsetting)) { var result = db.SKP.Update(x => new { x.idpejabatpenilai, x.tanggal, x.persetujuanatasan, x.persetujuanpenilai, x.keberatanatasan, x.keberatanpegawai, x.keberatanpenilai }, data, x => x.idskp == id); return(Ok(result)); } }
public IActionResult Post(Skp data) { using (var db = new OcphDbContext(this._dbsetting)) { var resultId = db.SKP.InsertAndGetLastID(data); if (resultId > 0) { data.idskp = resultId; } return(Ok(data)); } }