Question

Can anyone help me with this question, i am little confused.

I have an API (a DLL) which has various methods that return objects / collections of items.

I would like to create a Web Service that would return items to the calling client.

So whats the best approach, call my methods directory on my API and that convert these into the DTOS using automapper and return them to the Web Service?

Internally my API uses a Service / Repository layer.

The information that is returned form my API isn't always in the correct format. So i would have to do some adjusting or write new methods.

So would the best idea be to have my own Service / Repository layer that would interrogate the database directory for my WCF Service rather than using the API.

Or use the API for most of the items i can and implement its own Service / repository for items that are not available from API.

I don't want to be duplicating my work, but i really don't see options.

Maybe the Service / Repository should be shared by my WCF and by my API??

Idea or comments really appreciated of how to tackle this.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top