dramaling-app/apps/backend/DramaLing.Application/DependencyInjection.cs

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;
}
}