You don't need to rewrite your entire application to adopt VSA. The migration can be gradual, feature by feature. Here's the step-by-step approach I've used on production systems.
Phase 1: Pick One Feature
Choose a self-contained business operation — creating an order, registering a customer, processing a payment. Create a new folder: Features/[FeatureName]/. Inside, create a single file containing: the Minimal API endpoint mapping, the MediatR command or query record, and the handler class. Move the existing controller action logic and service layer code into the handler.
Phase 2: Extract Validation
If you're using FluentValidation, add a validator class in the same folder. If not, this is the perfect time to introduce it. Register validators via assembly scanning so they're discovered automatically.
Phase 3: Repeat
Continue migrating features one at a time. You'll notice that as more features move to VSA, the old layered structure becomes thinner. Eventually, you can delete entire projects that are now empty.
Key Takeaways
- Migration is additive, not destructive — VSA features run alongside layered code
- Start with one self-contained business operation
- Add validation in the same feature folder using FluentValidation
- Gradually delete empty projects as more features migrate