1 |
b80b186b
|
Milan Hotovec
|
using ExtCore.Infrastructure.Actions;
|
2 |
|
|
using Leuze.Core.Infrastructure.Persistence.Extensions;
|
3 |
|
|
using Microsoft.AspNetCore.Builder;
|
4 |
|
|
using Microsoft.Extensions.DependencyInjection;
|
5 |
|
|
using System;
|
6 |
|
|
|
7 |
|
|
namespace Leuze.Modules.Goal.Infrastructure.Persistence
|
8 |
|
|
{
|
9 |
|
|
/// <summary>
|
10 |
|
|
///
|
11 |
|
|
/// </summary>
|
12 |
|
|
public class ServicesConfiguration : IConfigureServicesAction
|
13 |
|
|
{
|
14 |
|
|
/// <summary>
|
15 |
|
|
///
|
16 |
|
|
/// </summary>
|
17 |
|
|
public int Priority => 1000;
|
18 |
|
|
|
19 |
|
|
/// <summary>
|
20 |
|
|
///
|
21 |
|
|
/// </summary>
|
22 |
|
|
/// <param name="services"></param>
|
23 |
|
|
/// <param name="serviceProvider"></param>
|
24 |
|
|
public void Execute(IServiceCollection services, IServiceProvider serviceProvider)
|
25 |
|
|
{
|
26 |
|
|
services.AddRepositories();
|
27 |
|
|
}
|
28 |
|
|
}
|
29 |
|
|
|
30 |
|
|
/// <summary>
|
31 |
|
|
///
|
32 |
|
|
/// </summary>
|
33 |
|
|
public class ApplicationConfiguration : IConfigureAction
|
34 |
|
|
{
|
35 |
|
|
/// <summary>
|
36 |
|
|
///
|
37 |
|
|
/// </summary>
|
38 |
|
|
public int Priority => 11000;
|
39 |
|
|
|
40 |
|
|
/// <summary>
|
41 |
|
|
///
|
42 |
|
|
/// </summary>
|
43 |
|
|
/// <param name="applicationBuilder"></param>
|
44 |
|
|
/// <param name="serviceProvider"></param>
|
45 |
|
|
public void Execute(IApplicationBuilder applicationBuilder, IServiceProvider serviceProvider) => applicationBuilder.MigrateDatabase();
|
46 |
|
|
}
|
47 |
|
|
}
|