lundi 28 janvier 2019

How should I structure my proyect to publish an external WEB API

everyone. I've recently finished a Web API (in .NET) which is aimed to search data and return it.

The problem is that I don't actually know how should I publish the API. My project is structured in layers (Presentation - Services - Business - DataAccess).

For the moment, the API is only consumed by Presentation. However, there is a possibility to be consumed by an external website so I need to publish the WEB API as an external project (I think) so it can be accessed by externals applications, forgive the redundancy.

The issue is that the WEB API, to search for data, consults Business Layer (which consults Data Access layer) and returns it as a JSON structure. But when I publish the WEB API as an external project it cannot longer access to the business layer which is contained in the original website.

Summarizing, I need to know how to structure my two independent projects (the website and the WEB API) in a way I can still access the business layer from the WEB API.

I've been searching and I found some people who suggest publishing the business layer as a separated project.




Aucun commentaire:

Enregistrer un commentaire