c# - I have an API that returns items, so do i need a Service / Repository, another layer of extraction -


can me question, little confused.

i have api (a dll) has various methods return objects / collections of items.

i create web service return items calling client.

so whats best approach, call methods directory on api , convert these dtos using automapper , return them web service?

internally api uses service / repository layer.

the information returned form api isn't in correct format. have adjusting or write new methods.

so best idea have own service / repository layer interrogate database directory wcf service rather using api.

or use api of items can , implement own service / repository items not available api.

i don't want duplicating work, don't see options.

maybe service / repository should shared wcf , api??

idea or comments appreciated of how tackle this.

it seems quickest way implement it, while maintaining maintainable (say 3 times), use api within service. so, web service methods call api.

if return caller serializable objects, , not entityobjects (assuming entity framework), don't need map dtos. return objects, , wcf automagically return dtos.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -