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