浏览代码

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 年前
committed by GitHub
父节点
当前提交
91c96a6dbe
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 2 个文件被更改,包括 2 次插入2 次删除
  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 查看文件

@@ -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 查看文件

@@ -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);



正在加载...
取消
保存