Exemplo n.º 1
0
        public IActionResult Update([FromBody] CrudViewModel <ONTLibConstLab_DellDeskComp> payload)
        {
            ONTLibConstLab_DellDeskComp oNTLibConstLab_DellDeskComp = payload.value;

            _context.ONTLibConstLab_DellDeskComp.Update(oNTLibConstLab_DellDeskComp);
            _context.SaveChanges();
            return(Ok(oNTLibConstLab_DellDeskComp));
        }
Exemplo n.º 2
0
        public IActionResult Remove([FromBody] CrudViewModel <ONTLibConstLab_DellDeskComp> payload)
        {
            ONTLibConstLab_DellDeskComp oNTLibConstLab_DellDeskComp = _context.ONTLibConstLab_DellDeskComp
                                                                      .Where(x => x.LogId == (long)payload.key)
                                                                      .FirstOrDefault();

            _context.ONTLibConstLab_DellDeskComp.Remove(oNTLibConstLab_DellDeskComp);
            _context.SaveChanges();
            return(Ok(oNTLibConstLab_DellDeskComp));
        }