public IActionResult Update([FromBody] CrudViewModel <CP1_DellDeskComp> payload) { CP1_DellDeskComp cP1_DellDeskComp = payload.value; _context.CP1_DellDeskComp.Update(cP1_DellDeskComp); _context.SaveChanges(); return(Ok(cP1_DellDeskComp)); }
public IActionResult Remove([FromBody] CrudViewModel <CP1_DellDeskComp> payload) { CP1_DellDeskComp cP1_DellDeskComp = _context.CP1_DellDeskComp .Where(x => x.LogId == (long)payload.key) .FirstOrDefault(); _context.CP1_DellDeskComp.Remove(cP1_DellDeskComp); _context.SaveChanges(); return(Ok(cP1_DellDeskComp)); }