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