예제 #1
0
        public static IServiceCollection AddApplicationModule(this IServiceCollection services,
                                                              IConfiguration configuration)

        {
            // Infrastructure
            services.AddInfrastructureModule(configuration);

            // CQRS
            services.AddProtoBufMessagingSerializer();
            services.AddCQRSWithMessaging(configuration);

            // Mappers
            services.AddSingleton(MapConfig.GetMapperConfiguration().CreateMapper());

            // Commands & Queries handlers
            services.AddCommands();
            services.AddQueries();

            // UseCases
            services.AddUseCases();

            return(services);
        }