public async Task <IActionResult> PutAuditorPortfolio(long id, AuditorPortfolio auditorPortfolio) { if (id != auditorPortfolio.Pid) { return(BadRequest()); } _context.Entry(auditorPortfolio).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AuditorPortfolioExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <AuditorPortfolio> > PostAuditorPortfolio(AuditorPortfolio auditorPortfolio) { _context.AuditorPortfolio.Add(auditorPortfolio); await _context.SaveChangesAsync(); return(CreatedAtAction("GetAuditorPortfolio", new { id = auditorPortfolio.Pid }, auditorPortfolio)); }