public async Task <IActionResult> PutMessage_Chain(int id, Message_Chain message_Chain) { if (id != message_Chain.MessageChainId) { return(BadRequest()); } _context.Entry(message_Chain).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Message_ChainExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutApplication(int id, Application application) { if (id != application.RollNumber) { return(BadRequest()); } _context.Entry(application).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ApplicationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutColleague(int id, Colleague colleague) { if (id != colleague.ColleagueId) { return(BadRequest()); } _context.Entry(colleague).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ColleagueExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutBroker(int id, Broker broker) { if (id != broker.BrokerId) { return(BadRequest()); } _context.Entry(broker).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BrokerExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }