Usually, we separate our solution into different layers and use DI container to keep them working together:
Web ( UI, Controller, ViewModel )
Service ( IService, Service, IRepository )
Data ( Implementation of IRepository )
Core ( Domain + Utils )
But when I decide to use ServiceStack, I found it is a little different,
1. Since we don't need Controller, we don't need to inject IService to Web project either.
2. We use ORMLite to operate the repository, and it's a property of Service, does it mean we don't need a separated DAL anymore ? If so, how could we switch the database in the future ?
all the examples of service stack all be placed in a single web project. Is there any demo show how to separate layers ?
Thanks.