Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Project

Testing PersonAppService From Browser Console

Now, lets run and login to the application again, open Chrome Developer Console (or similar tools in other browsers) and write the following command:

Google Chrome Console AJAX

This command performs an AJAX call to PersonAppService.GetPeople method. We can see the request if we open Network tab:

Google Chrome Console Get People

As we see, an AJAX request made and people are got successfully.

So, how this happen? How we could make a call to a C# class method (notice that it's not an MVC Controller, just a plain C# class) from javascript like calling a javascript method? This is provided by ASP.NET Boilerplate. See AspNet Core documentation for more information. You can always call application services from console to debug or see returned JSON structure.

We can also check Audit Logs to see the request. Open AbpAuditLogs table in PhoneBook database to see the call information:

Audit Logs table

There are some other fields not shown here. So, we see that User with Id=2 called GetPeople method of the PersonAppService in recorded time with the shown parameters and it's executed in 134 ms.

Next

Contributors


Last updated: March 27, 2019 Edit this page on GitHub
In this document