Guides for Serilog and EFCore (#2134)
* Add serilog guide * added suggestions from Rozen * Add efcore guide * Fix review changes * Fix grammatical errors & review points
This commit is contained in:
9
docs/guides/other_libs/samples/DbContextDepInjection.cs
Normal file
9
docs/guides/other_libs/samples/DbContextDepInjection.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
private static ServiceProvider ConfigureServices()
|
||||
{
|
||||
return new ServiceCollection()
|
||||
.AddDbContext<ApplicationDbContext>(
|
||||
options => options.UseNpgsql("Your connection string")
|
||||
)
|
||||
[...]
|
||||
.BuildServiceProvider();
|
||||
}
|
||||
Reference in New Issue
Block a user