public async Task <IActionResult> PutCustomerAccount(int id, CustomerAccount customerAccount) { if (id != customerAccount.Id) { return(BadRequest()); } _context.Entry(customerAccount).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CustomerAccountExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutOrderDetails(int id, OrderDetails orderDetails) { if (id != orderDetails.Id) { return(BadRequest()); } _context.Entry(orderDetails).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrderDetailsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutFollowedShops(int id, FollowedShops followedShops) { if (id != followedShops.Id) { return(BadRequest()); } _context.Entry(followedShops).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FollowedShopsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }