Hi there,
i wish to create a repository pattern but with a WCF Rest Service which controls the data access. Can anyone confirm or help with my thinking / config.
ASP.NET Controllers call to service (not rest service but service of a repository pattern) Repository Pattern Service >> calls to repository Repository >> calls to WCF Rest Service to receive data.
Is this setup good, or should i remove the Repository layer and have the Repository service call directly to the REST Service?
Does anyone do a similar setup?
I would love to hear comments?
Basically my Rest Service (WCF) would return XHTML...
So in my repository layer how would i convert whats returned from my Rest Service into IQUERYABLE? I presume i would need to do ReadAsDataContract into a class (data contract) and then use LINQ to OBJECTS?? This is a causing me a bit of confusing
Becuase of course the normal is to return IQUERYABLE form the repository layer to the service layer
Then the service layer returns to the calling client normal as TOLIST or similar.
Really appreciated any input anyone has.
Thanks
EDIT
Ermm after rethining this, i think i am doing it wrong... i should basically just covert the Service layer of the repository into a WCF REST Service... this way my other clients can call my rest service??
I suppose i keep the Repository layer there but i could get this to call a Data Services layers (technically another rest service) for my data acces..
Does this make better sense?