I have the following solutions structure: 1- Asp.net Core MVC project1 (views and UI) 2- Asp.net core API project2 (api) 3- EF Core project3 (db access)
simple scenario is project 1 make call to project 2 and project 2 request data from project 3
There is no direct link between project1 and project3 How can i install MiniProfiler so that i can see all my SQL transactions in my view?
1.Install
MiniProfiler.AspNetCore.Mvcin Project 12.Install
MiniProfiler.EntityFrameworkCorein Project 13.ConfigureServices in Project 1:
4.Configure in Project 1:
5.Add Tag Helpers in _ViewImports.cshtml:
6.Add MiniProfiler to your master layout (Shared/_Layout.cshtml by default):
7.How to see sql transactions:
Here is a simple demo that I test for MiniProfiler:
EF Core Project 3:
Web Api Project 2(add reference to Project 3):
Startup.cs:
MVC Project 1(add reference to Project 2):
1.Controller:
2.Startup.cs: