-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathProgram.cs
More file actions
19 lines (15 loc) · 589 Bytes
/
Program.cs
File metadata and controls
19 lines (15 loc) · 589 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using Application.Providers;
using Application.Providers.Interfaces;
using Application.Services;
using Application.Services.Interfaces;
using Application.Validators;
using Application.Validators.Interfaces;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddTransient<IProvider, Provider>();
services.AddTransient<IValidator, Validator>();
services.AddTransient<IService, Service>();
var serviceProvider = services.BuildServiceProvider();
var service = serviceProvider.GetService<IService>();
service?.Migrate();
Console.ReadLine();