public IActionResult Index([FromServices] IIdentifierServiceScoped identifierServiceScopedFromMethod, [FromServices] IIdentifierServiceTransient identifierServiceTransientFromMethod) { ViewData["Message"] = "Voici nos courriels si vous désirez nous contacter !"; var viewModel = new IndexViewModel { TransientId = _identifierServiceTransient.Id, ScopedId = _identifierServiceScoped.Id, OtherTransientId = identifierServiceTransientFromMethod.Id, OtherScopedId = identifierServiceScopedFromMethod.Id }; return(View(viewModel)); }
public HomeController(IIdentifierServiceScoped identifierServiceScoped, IIdentifierServiceTransient identifierServiceTransient) { _identifierServiceScoped = identifierServiceScoped; _identifierServiceTransient = identifierServiceTransient; }