Practice question from .NET Aspire
Which method adds multiple service replicas for testing? A. .WithInstances(3) B. .WithCopies(3) C. .WithReplicas(3) D. .Scale(3) E. .Duplicate(3)
var api = builder.AddProject<Projects.Api>("api")
.____(3);Answer
C
Explanation
WithReplicas(3) starts three instances of the service, allowing you to test load balancing, resilience patterns, and distributed scenarios locally.