public async Task <IActionResult> PutTPifrightDetails(long id, TPifrightDetails tPifrightDetails) { if (id != tPifrightDetails.Id) { return(BadRequest()); } _context.Entry(tPifrightDetails).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TPifrightDetailsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <TPifrightDetails> > PostTPifrightDetails(TPifrightDetails tPifrightDetails) { _context.TPifrightDetails.Add(tPifrightDetails); await _context.SaveChangesAsync(); return(CreatedAtAction("GetTPifrightDetails", new { id = tPifrightDetails.Id }, tPifrightDetails)); }