17 lines
457 B
C#
17 lines
457 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using System.Reflection;
|
|
|
|
namespace DramaLing.Application;
|
|
|
|
public static class DependencyInjection
|
|
{
|
|
public static IServiceCollection AddApplication(this IServiceCollection services)
|
|
{
|
|
services.AddMediatR(cfg =>
|
|
cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly()));
|
|
|
|
services.AddAutoMapper(Assembly.GetExecutingAssembly());
|
|
|
|
return services;
|
|
}
|
|
} |