public async Task <ActionResult <PointsTypeActive> > PostPointsTypeActive(PointsTypeActive pointsTypeActive) { _context.PointsTypeActive.Add(pointsTypeActive); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPointsTypeActive", new { id = pointsTypeActive.PtaId }, pointsTypeActive)); }
public async Task <IActionResult> PutPointsTypeActive(Guid id, PointsTypeActive pointsTypeActive) { if (id != pointsTypeActive.PtaId) { return(BadRequest()); } _context.Entry(pointsTypeActive).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PointsTypeActiveExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }