Ver código fonte

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 anos atrás
committed by GitHub
pai
commit
91c96a6dbe
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 4AEE18F83AFDEB23
2 arquivos alterados com 2 adições e 2 exclusões
  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 Ver arquivo

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



+ 1
- 1
docs/content/user-guide/zh/getting-started/quick-start.md Ver arquivo

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



Carregando…
Cancelar
Salvar