Back to results for “Dependency Injection”
.NET MAUI › Advanced & Enterprise

How do you structure a large, enterprise MAUI solution?

Advanced

Answer

Separate concerns into projects: the MAUI head (UI, pages, view models), a shared domain/core library (models, services, interfaces), infrastructure (data, API clients), and a test project. Use DI throughout, MVVM with compiled bindings, and feature folders. Keep platform code isolated behind interfaces so the core stays portable and testable.
MyApp.sln
├─ MyApp.Maui        (UI, ViewModels)
├─ MyApp.Core        (Models, Interfaces, Services)
├─ MyApp.Infrastructure (Api, Sqlite)
└─ MyApp.Tests       (xUnit)
Real-world example A large team keeps business logic in MyApp.Core so it's shared, unit-tested, and independent of the MAUI UI.

Common follow-ups: Why isolate platform code behind interfaces? | Where does business logic live?