AspNetCore.Docs
AspNetCore.Docs copied to clipboard
'Id' should be removed from the TodoItemDTO class constructor
The TodoItemDTO class constructor takes an 'Id' parameter:
public TodoItemDTO(Todo todoItem) =>
(Id, Name, IsComplete) = (todoItem.Id, todoItem.Name, todoItem.IsComplete);
The constructor should be changed to:
public TodoItemDTO(Todo todoItem) =>
(Name, IsComplete) = (todoItem.Name, todoItem.IsComplete);
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: ab408035-6313-a183-9940-32de00e0e977
- Version Independent ID: ab408035-6313-a183-9940-32de00e0e977
- Content: Tutorial: Create a minimal web API with ASP.NET Core
- Content Source: aspnetcore/tutorials/min-web-api.md
- Product: aspnet-core
- Technology: aspnetcore-tutorials
- GitHub Login: @Rick-Anderson
- Microsoft Alias: riande
Duplicate of #23803