public async Task <IActionResult> PutMusikModel(int id, MusikModel musikModel) { if (id != musikModel.Id) { return(BadRequest()); } _context.Entry(musikModel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MusikModelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutMusikModel(int id, MusikModel musikModel) { if (id != musikModel.id) { return(BadRequest()); } _context.Entry(musikModel).State = EntityState.Modified; try { } catch (Exception e) { Console.WriteLine(e); throw; } { await _context.SaveChangesAsync(); }