vendredi 30 janvier 2015

Best Pratices Domain Entities Composition?

I have the following project structure:



- Application.DataAccess : IUserRepository....
- Application.DataAccess : IUserRepository....
- Application.Busines : IUserService, ICustomerService...
- Application.Infrastructure : Logging, Exception handling... (Cross-cutting.)
- Application.Domain : User, Customer... (Entities)
- Application.WindowsForms : UI


Almost all of my service operations will have the following parameters:



  • User userOfOperation (That is in Doimain layer and represents a user)

  • PlaceOfOperation placeOfOperation (That is in Doimain layer and represents a branch office)


I think that i should create a new class and encapsulate this entities on it then call it"OperationSource".


like:



class OperationSource
{
Domain.User UserOfOperation { get; set; }
Domain.Enterprise PlaceOfOperation { get; set; }
}


Where should i put the compose classes (e.g OperationSource) in this case, on my Application.Busines or Application.Domain?


Aucun commentaire:

Enregistrer un commentaire