public async Task <IActionResult> PutNeuralSettingsSet([FromRoute] int id, [FromBody] NeuralSettingsSet neuralSettingsSet) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != neuralSettingsSet.Id) { return(BadRequest()); } _context.Entry(neuralSettingsSet).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NeuralSettingsSetExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostNeuralSettingsSet([FromBody] NeuralSettingsSet neuralSettingsSet) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.NeuralSettingsSet.Add(neuralSettingsSet); await _context.SaveChangesAsync(); return(CreatedAtAction("GetNeuralSettingsSet", new { id = neuralSettingsSet.Id }, neuralSettingsSet)); }