示例#1
0
        public IActionResult Edit([FromBody] CrudViewModel <TConfirmContact> payload)
        {
            TConfirmContact confirmContact = payload.value;

            _context.TConfirmContact.Update(confirmContact);
            _context.SaveChanges();
            return(Ok(confirmContact));
        }
示例#2
0
        public IActionResult Remove([FromBody] CrudViewModel <TConfirmContact> payload)
        {
            TConfirmContact confirmContact = _context.TConfirmContact
                                             .Where(x => x.confirmcontactID == (int)payload.key)
                                             .FirstOrDefault();

            _context.TConfirmContact.Remove(confirmContact);
            _context.SaveChanges();
            return(Ok(confirmContact));
        }