public IActionResult Edit([FromBody] CrudViewModel <TConfirmContact> payload) { TConfirmContact confirmContact = payload.value; _context.TConfirmContact.Update(confirmContact); _context.SaveChanges(); return(Ok(confirmContact)); }
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)); }