@page "/turrets" @rendermode InteractiveServer @using Microsoft.EntityFrameworkCore @using Microsoft.AspNetCore.Components.QuickGrid @using Microsoft.AspNetCore.Components.QuickGrid.EntityFrameworkAdapter @using ZenithInfo.Models @using ZenithInfo.Data @implements IAsyncDisposable @inject IDbContextFactory DbFactory Index

Index

Create New

Edit | Details | Delete
@code { private ZenithInfoContext context = default!; private PaginationState pagination = new PaginationState { ItemsPerPage = 5 }; private string nameFilter = string.Empty; private IQueryable FilteredTurrets => context.Turret.Where(m => m.Name!.Contains(nameFilter)); protected override void OnInitialized() { context = DbFactory.CreateDbContext(); } public async ValueTask DisposeAsync() => await context.DisposeAsync(); }