Skip to content

Missing Lambda expression variable name  #33676

@rajanmishra18

Description

@rajanmishra18

Description

[Enter feedback here]
Inside ConfigureService while implementing IMiddlewareFactory variable name is only _ while _container is being used.

services.AddTransient<IMiddlewareFactory>(_ => { return new SimpleInjectorMiddlewareFactory(_container); });
This should be replaced with

services.AddTransient<IMiddlewareFactory>(_container => { return new SimpleInjectorMiddlewareFactory(_container); });

Page URL

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/extensibility-third-party-container?view=aspnetcore-8.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/middleware/extensibility-third-party-container.md

Document ID

ea1db4c0-e8cc-98e8-a235-8c80e9a8f395

Article author

@Rick-Anderson

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions