0

Using MVC Template with jQuery ASP.Net Core 2.0

Taking the code below as an example, I'm unclear as to actually what or how this call is constructed and what path it takes (API or direct ref to app services).

enter image description here

snipped...

enter image description here

I do understand that the fetches from the Controllers are via the Application Services directly (not API calls) using the template in it's default state.

It's just the create/update/delete calls via the JavaScript that has me a slightly confused.

1 Answer 1

1

It is an API call.

How it actually works...

From the documentation on Client Proxies:

ABP can automatically create JavaScript proxies for all MVC Controllers (not only application services). It's created for Application Services as Controllers by default. You can add the [RemoteService] attribute to any MVC controller to create a client proxy for it. JavaScript proxies are dynamically generated at runtime. You need to add a given script to your page:

<script src="~/AbpServiceProxies/GetAll?type=jquery" type="text/javascript"></script>

For the template, it's added in _Layout.cshtml.

If you're interested in the implementation, the proxies are created in JQueryProxyScriptGenerator.

2
  • How could be possible to implement use in other projecte without ABP framework? Mar 27, 2021 at 11:38
  • The implementation is linked.
    – aaron
    Mar 27, 2021 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.