I am currently trying to develop Blazor Quick Grid. I have my data access and database set up. I can get data to and from the db just fine. I am using entity framework for my data access and SQL for my db. However, I am not sure how to get data from foreign relationships with quick grid.The data relationship is a 1:N. Where item has a collection of specialitems and special items has a foreign key and id for item. However, It seems like you can only have one instance of data. I currently have something like this example:
//Blazor Page
<QuickGrid Items="@itemsQueryable" ResizableColumns="true" Pagination="@pagination">
<div class="row">
<div>
<PropertyColumn title="Start Date" Property="@(c =>c.Name)"Sortable="true" Align="Align.Left" />
</div>
<QuickGrid>
@code {
// I get the data via
protected override async Task OnInitializedAsync()
{
allItems = await detour.GetAllItems();
allSpecialItems = await routes.GetAllSpecialItems();
if (allItems != null)
{
itemsQueryable = allItems.AsQueryable();
if (allSpecialItems != null)
{
specialItemsQueryable = allSpecialItems.AsQueryable();
}
}
}
I am expecting to reference a value in the foreign key table. The relationship is a 1: N.