public async Task <IActionResult> PutBusinessPartner(Guid id, BusinessPartner businessPartner) { if (id != businessPartner.BusinessPartnerId) { return(BadRequest()); } _context.Entry(businessPartner).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BusinessPartnerExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPriceCategory(Guid id, PriceCategory priceCategory) { if (id != priceCategory.PriceCategoryId) { return(BadRequest()); } _context.Entry(priceCategory).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PriceCategoryExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }