-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDependencyInjection.cs
More file actions
33 lines (24 loc) · 1020 Bytes
/
DependencyInjection.cs
File metadata and controls
33 lines (24 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
namespace PX_API;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
public static class DependencyInjection
{
public static IServiceCollection AddApplication(this IServiceCollection services)
{
//services.AddValidatorsFromAssembly(typeof(DependencyInjection).Assembly);
//services.AddValidatorsFromAssemblyContaining()
services.AddMediatR(options =>
{
options.RegisterServicesFromAssembly(typeof(DependencyInjection).Assembly);
});
return services;
}
public static IServiceCollection AddInfrastructure(this IServiceCollection services, IConfiguration configuration)
{
//services.AddScoped<IDomainEventService, DomainEventService>();
//services.AddTransient<IDateTime, DateTimeService>();
//services.AddTransient<ICsvFileBuilder, CsvFileBuilder>();
//services.AddSingleton<ICurrentUserService, CurrentUserService>();
return services;
}
}