using Svrnty.CQRS.Abstractions; using Svrnty.CQRS.FluentValidation; using Svrnty.CQRS.Grpc.Sample; using Svrnty.CQRS.Grpc.Sample.Grpc.Extensions; var builder = WebApplication.CreateBuilder(args); // Register command handlers with CQRS and FluentValidation builder.Services.AddCommand(); builder.Services.AddCommand(); // Register query handlers with CQRS builder.Services.AddQuery(); // Auto-generated: Register gRPC services for both commands and queries (includes reflection) builder.Services.AddGrpcCommandsAndQueries(); var app = builder.Build(); // Auto-generated: Map gRPC endpoints for both commands and queries app.MapGrpcCommandsAndQueries(); // Map gRPC reflection service app.MapGrpcReflectionService(); Console.WriteLine("Auto-Generated gRPC Server with Reflection and Validation"); Console.WriteLine("http://localhost:5000"); app.Run();