¿Pueden los servicios compartir objetos de acceso a datos (DAO)?

Can two services which are hosted separately share a DAO?

I am creating a solution which has Data layer that contains many DAOS and I want to create a service layer on top of it which will contain multiple services which will be publicly hosted. I am trying to understand if several DAOs can be shared by a service because I have seen solutions which only contain one DAO per service?

preguntado el 08 de noviembre de 11 a las 11:11

1 Respuestas

It would depend on how the DAL/DAO was deployed, if the objects shared a common AppDomain then it would be exposed to all services easily, if they are in seperate AppDomains then it is possible but somewhat complicated and arguably worth doing.

If you need to ensure some form of "shared or common" data cache, transactional or data integrity between your persisted data source and your server you could implement a Data Objects tier between your Services and your data source(s). You could then use a NamedPipes or NetTcp binding and a higher level of security between the Public API the DAL and the end Data source.

respondido 08 nov., 11:15

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.