1

I am using Microsoft ASP.NET Web API 2 and one of my end points has to internally invoke a legacy non-Microsoft web service (not asmx or svc) .

Which layer should I invoke this in?

I currently have : Repository layer: where all the CRUD calls to DB are done now.

Domain Manager: where respective manager classes invoke the Repository Layer methods.

And my Web API Controller methods invoke the respective Domain Manager methods.

Should I just have another method in my Repository Layer which invokes the web service? And follow the usual pattern above?

1 Answer 1

1

The repository layer is the logical place to put it; the data that you're pulling back from the web service will need to be wrapped in domain-specific abstractions, so (in concept) it is essentially another data store alongside your own databases.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.