|
|
|
@ -2,6 +2,7 @@ using System.IO; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
using Serilog; |
|
|
|
using Serilog.Events; |
|
|
|
|
|
|
|
@ -30,6 +31,7 @@ namespace MyCompanyName.MyProjectName.DbMigrator |
|
|
|
|
|
|
|
public static IHostBuilder CreateHostBuilder(string[] args) => |
|
|
|
Host.CreateDefaultBuilder(args) |
|
|
|
.ConfigureLogging((context, logging) => logging.ClearProviders()) |
|
|
|
.ConfigureServices((hostContext, services) => |
|
|
|
{ |
|
|
|
services.AddHostedService<DbMigratorHostedService>(); |
|
|
|
|