public async Task <IActionResult> PutShop(int id, Shop shop) { if (id != shop.ShopId) { return(BadRequest()); } _context.Entry(shop).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ShopExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutAusgaben(int id, Ausgaben ausgaben) { if (id != ausgaben.Id) { return(BadRequest()); } _context.Entry(ausgaben).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AusgabenExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }