The title of the question may be unclear, but what I want to do looks something like this:
This is how I align my application
App.Domain App.Services App.Web
I want, if I ask for something like /api/OrderProcessor/GetAllOrder, it will call the method GetAllOrderin App.Services.OrderProcessorService.
The method will return IList<Order>, and I would like it to be serialized in JSON according to a specific format (I actually use ExtJS), maybe something like:
{
success: true,
totalCount: 10,
list: [ { ... }, { ... } ]
}
I can continue and perform services as controllers, but I do not want the service layer to be corrupted by presentation materials.
How can I make such a wrapper controller?
- , , , , IoC, , , , XML , , DTO .
?