bgmulinari / B1SLayer

A lightweight SAP Business One Service Layer client for .NET
MIT License
122 stars 42 forks source link

Request view #32

Closed GustavoArriola closed 1 year ago

GustavoArriola commented 1 year ago

Call to 'View Service Endpoint' implementation.

bgmulinari commented 1 year ago

Hi, @GustavoArriola.

I appreciate the contribution, however I don't think this is a good addition to B1SLayer as the View Service Endpoint is only available in the SQL Server version of Bussines One, so this implementation would not work in the HANA version where views are exposed through the Semantic Layer.

In any case, you can already call views by simply specifying the desired endpoint and performing a standard GET request:

View Service Endpoint in SQL Server version

var result = await serviceLayer.Request("view.svc/YourViewName").GetAsync();

Semantic Layer Service in HANA version

var result = await serviceLayer.Request("sml.svc/YourViewName").GetAsync();
GustavoArriola commented 1 year ago

Thanks @bgmulinari for the clarification!