Method AddNLogToDatabase
- Namespace
- Innova.NLogExtensions.RestServer
- Assembly
- Innova.NLogExtensions.RestServer.dll
AddNLogToDatabase(WebApplicationBuilder, SqlConnectionOption)
Adds NLog to the database using the specified SQL connection option.
public static WebApplicationBuilder AddNLogToDatabase(this WebApplicationBuilder builder, SqlConnectionOption sqlConnectionOption)
Parameters
builder
WebApplicationBuilderThe WebApplicationBuilder instance.
sqlConnectionOption
SqlConnectionOptionThe SQL connection option.
Returns
- WebApplicationBuilder
The WebApplicationBuilder instance.
AddNLogToDatabase<TDBLogService>(WebApplicationBuilder, SqlConnectionOption)
Adds NLog to the database using the specified SQL connection option and a custom database logging service.
public static WebApplicationBuilder AddNLogToDatabase<TDBLogService>(this WebApplicationBuilder builder, SqlConnectionOption sqlConnectionOption) where TDBLogService : class, IDataBaseLoggingService
Parameters
builder
WebApplicationBuilderThe WebApplicationBuilder instance.
sqlConnectionOption
SqlConnectionOptionThe SQL connection option.
Returns
- WebApplicationBuilder
The WebApplicationBuilder instance.
Type Parameters
TDBLogService
The type of the custom database logging service.