public async Task <ActionResult <ShoeModels> > PostShoeModels(ShoeModels shoeModels) { _context.ShoeData.Add(shoeModels); await _context.SaveChangesAsync(); return(CreatedAtAction("GetShoeModels", new { id = shoeModels.Id }, shoeModels)); }
public async Task <IActionResult> PutShoeModels(int id, ShoeModels shoeModels) { if (id != shoeModels.Id) { return(BadRequest()); } _context.Entry(shoeModels).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ShoeModelsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }