Not sure if I understand your question entirely. But how I read this question is you have to load your page whenever a tab changes and don't want to load the entire page at once at the beginning. This has nothing to do with which ORM you use at the backend as I see it. What need to make a asynchronous javascript call to the server when user clicks on the tab and load a partial page under that tab.
https://getbootstrap.com/docs/4.0/components/navs/
- show.bs.tab (on the to-be-shown tab)
- shown.bs.tab (on the newly-active just-shown tab, the same one as for the show.bs.tab event)
I suggest you use the first event and in that event make an ajax call to a partial page.
https://www.learnrazorpages.com/razor-pages/ajax/partial-update
@page
@model RazorPagesTests.Pages.AjaxPartialModel
<h2>Ajax</h2>
<p><button class="btn btn-primary" id="load">Load</button></p>
<div id="grid"></div>
@section scripts{
<script>
document.getElementById('load').addEventListener('click', () => {
fetch('/ajaxpartial?handler=CarPartial')
.then((response) => {
return response.text();
})
.then((result) => {
document.getElementById('grid').innerHTML = result;
});
});
</script>
}
Hope it helps. If not then I'm here to help you. Please give me more information what you want to do.