public async Task <IActionResult> PutCampaign(Guid id, Campaign campaign) { if (id != campaign.Id) { return(BadRequest()); } _context.Entry(campaign).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CampaignExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }