public IActionResult Update([FromBody] CrudViewModel <Smallair> payload) { Smallair SmallairType = payload.value; _context.Smallair.Update(SmallairType); _context.SaveChanges(); return(Ok(SmallairType)); }
public IActionResult Remove([FromBody] CrudViewModel <Smallair> payload) { Smallair SmallairType = _context.Smallair .Where(x => x.smallairid == (int)payload.key) .FirstOrDefault(); _context.Smallair.Remove(SmallairType); _context.SaveChanges(); return(Ok(SmallairType)); }