Example #1
0
        public IActionResult Update([FromBody] CrudViewModel <Smallair> payload)
        {
            Smallair SmallairType = payload.value;

            _context.Smallair.Update(SmallairType);
            _context.SaveChanges();
            return(Ok(SmallairType));
        }
Example #2
0
        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));
        }