public async Task <ActionResult <ModelTires> > PostModelTires(ModelTires modelTires) { _context.ModelTires.Add(modelTires); await _context.SaveChangesAsync(); return(CreatedAtAction("GetModelTires", new { id = modelTires?.Id }, modelTires)); }
public async Task <IActionResult> PutModelTires(int id, ModelTires modelTires) { if (id != modelTires?.Id) { return(BadRequest()); } _context.Entry(modelTires).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ModelTiresExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }