Browse Source

Fix attribute in Quick Start (#802)

Change from `FromService` to `FromServices`.
Ref:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.fromservicesattribute
master
Martin Andersen 3 years ago
committed by GitHub
parent
commit
91c96a6dbe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      docs/content/user-guide/en/getting-started/quick-start.md
  2. +1
    -1
      docs/content/user-guide/zh/getting-started/quick-start.md

+ 1
- 1
docs/content/user-guide/en/getting-started/quick-start.md View File

@@ -36,7 +36,7 @@ public void ConfigureServices(IServiceCollection services)
public class PublishController : Controller public class PublishController : Controller
{ {
[Route("~/send")] [Route("~/send")]
public IActionResult SendMessage([FromService]ICapPublisher capBus)
public IActionResult SendMessage([FromServices]ICapPublisher capBus)
{ {
capBus.Publish("test.show.time", DateTime.Now); capBus.Publish("test.show.time", DateTime.Now);




+ 1
- 1
docs/content/user-guide/zh/getting-started/quick-start.md View File

@@ -36,7 +36,7 @@ public void ConfigureServices(IServiceCollection services)
public class PublishController : Controller public class PublishController : Controller
{ {
[Route("~/send")] [Route("~/send")]
public IActionResult SendMessage([FromService]ICapPublisher capBus)
public IActionResult SendMessage([FromServices]ICapPublisher capBus)
{ {
capBus.Publish("test.show.time", DateTime.Now); capBus.Publish("test.show.time", DateTime.Now);




Loading…
Cancel
Save