diff --git a/mvc/action-return-types/8.x/WebApiSample/Controllers/ActionResultOfTProductsController.cs b/mvc/action-return-types/8.x/WebApiSample/Controllers/ActionResultOfTProductsController.cs index 0216d54..58f7134 100644 --- a/mvc/action-return-types/8.x/WebApiSample/Controllers/ActionResultOfTProductsController.cs +++ b/mvc/action-return-types/8.x/WebApiSample/Controllers/ActionResultOfTProductsController.cs @@ -41,7 +41,7 @@ public class ActionResultOfTProductsController : ControllerBase _productContext.Products.Add(product); await _productContext.SaveChangesAsync(); - return CreatedAtAction(nameof(GetById_ActionResultOfT), new { id = product.Id }, product); + return CreatedAtAction(nameof(CreateAsync_ActionResultOfT), new { id = product.Id }, product); } // } diff --git a/mvc/action-return-types/8.x/WebApiSample/Controllers/ActionResultProductsController.cs b/mvc/action-return-types/8.x/WebApiSample/Controllers/ActionResultProductsController.cs index 85737d5..b006799 100644 --- a/mvc/action-return-types/8.x/WebApiSample/Controllers/ActionResultProductsController.cs +++ b/mvc/action-return-types/8.x/WebApiSample/Controllers/ActionResultProductsController.cs @@ -41,7 +41,7 @@ public class ActionResultProductsController : ControllerBase _productContext.Products.Add(product); await _productContext.SaveChangesAsync(); - return CreatedAtAction(nameof(GetById_IActionResult), new { id = product.Id }, product); + return CreatedAtAction(nameof(CreateAsync_IActionResult), new { id = product.Id }, product); } // } diff --git a/mvc/action-return-types/8.x/WebApiSample/Controllers/IResultProductsController.cs b/mvc/action-return-types/8.x/WebApiSample/Controllers/IResultProductsController.cs index d03f7d2..af3be21 100644 --- a/mvc/action-return-types/8.x/WebApiSample/Controllers/IResultProductsController.cs +++ b/mvc/action-return-types/8.x/WebApiSample/Controllers/IResultProductsController.cs @@ -41,7 +41,7 @@ public class IResultProductsController : ControllerBase _productContext.Products.Add(product); await _productContext.SaveChangesAsync(); - var location = Url.Action(nameof(GetById), new { id = product.Id }) ?? $"/{product.Id}"; + var location = Url.Action(nameof(CreateAsync), new { id = product.Id }) ?? $"/{product.Id}"; return Results.Created(location, product); } // diff --git a/mvc/action-return-types/8.x/WebApiSample/Controllers/ResultsOfTProductsController.cs b/mvc/action-return-types/8.x/WebApiSample/Controllers/ResultsOfTProductsController.cs index dd74f9b..e151fce 100644 --- a/mvc/action-return-types/8.x/WebApiSample/Controllers/ResultsOfTProductsController.cs +++ b/mvc/action-return-types/8.x/WebApiSample/Controllers/ResultsOfTProductsController.cs @@ -36,7 +36,7 @@ public class ResultsOfTProductsController : ControllerBase _productContext.Products.Add(product); await _productContext.SaveChangesAsync(); - var location = Url.Action(nameof(GetById), new { id = product.Id }) ?? $"/{product.Id}"; + var location = Url.Action(nameof(CreateAsync), new { id = product.Id }) ?? $"/{product.Id}"; return TypedResults.Created(location, product); } //