public async Task <IActionResult> PutCommand(int id, Command command) { if (id != command.Id) { return(BadRequest()); } _context.Entry(command).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CommandExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPlatform(int id, Platform platform) { if (id != platform.Id) { return(BadRequest()); } _context.Entry(platform).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PlatformExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public void Update(User user) { _commandsContext.Entry(user).State = EntityState.Modified; }
public void Update(Domain.AggregatesModel.Tasks.Task task) { _commandsContext.Entry(task).State = EntityState.Modified; }