Forked from KristianMariyanov/LoggingEFCoreSQLQueries.cs
Created
February 18, 2020 10:26
-
-
Save Stamo-Gochev/9aa248c75da77200bcbd8d1037e61e4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static readonly ILoggerFactory MyLoggerFactory = LoggerFactory.Create(builder => { builder.AddDebug(); }); | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddDbContext<WeatherForecastContext>(options => | |
options.UseLoggerFactory(MyLoggerFactory) | |
.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")), ServiceLifetime.Transient); | |
services.AddRazorPages(); | |
services.AddServerSideBlazor(); | |
services.AddScoped<WeatherForecastService>(); | |
services.AddTelerikBlazor(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment