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