masastack / MASA.Docs

Apache License 2.0
15 stars 24 forks source link

_userCaller是哪来的 #217

Closed sunday866 closed 1 year ago

sunday866 commented 1 year ago

[ApiController] [Route("api/[controller]/[action]")] public class UserController : ControllerBase { private readonly ICaller _caller;

public UserController(ICaller caller) => _caller = caller;

public async Task<IActionResult> HelloAsync(int userId)
{
    var userObj = await _userCaller.HelloAsync("word");
    return Ok(userObj);
}

}

zhenlei520 commented 1 year ago

没有_userCaller,它应该是_caller,方便的话可以提个pr 🙏🙏