© 2026 Hedgehog Software, LLC
public IActionResult Put( Guid id, UpdateItemDto updateItemDto) { var existingItem = Items .FirstOrDefault(item => item.Id == id); var updatedItem = existingItem with { Name = updateItemDto.Name, Description = updateItemDto.Description, Price = updateItemDto.Price }; var index = Items.FindIndex(existingItem => existingItem.Id == id); Items[index] = updatedItem; return NoContent(); }
existingItem
var updatedItem = existingItem with