ASP.NET Core DI
public class MyScopedService : IMyScopedService | |
{ | |
private readonly ILogger<MyScopedService> _logger; | |
public MyScopedService (ILogger<MyScopedService> logger) | |
{ | |
_logger = logger; | |
} | |
public void DoSomething () | |
{ | |
_logger.LogInformation ($" { nameof(MyScopedService) } does something "); | |
} | |
} | |
public interface IMyScopedService | |
{ | |
void DoSomething (); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment