private void LoadGrid() { portsGridView = locations .SelectMany(p => p.Ports) .Select(p => PortDetailsGridView.FromPort(p)) .ToArray(); }
protected async Task SaveLocation() { Db.PortDetails.Add(portForm.ToPortDetails()); await Db.SaveChangesAsync(); locations = await Db.Locations.ToArrayAsync(); portsGridView = locations .SelectMany(p => p.Ports) .Where(AreValidRecords) .Select(p => PortDetailsGridView.FromPort(p)) .ToArray(); portForm = new PortDetailsForm(); await EditorPanel.HideAsync(); await SuccessNotification.Show(); }
private async Task LoadGrid() { portsGridView = await Db.PortDetails.Select(p => PortDetailsGridView.FromPort(p)).ToArrayAsync(); }
protected async Task <PortDetailsGridView[]> LoadPortsViewModel() => await Db.PortDetails.Include(p => p.Location) .Select(p => PortDetailsGridView.FromPort(p)) .ToArrayAsync();
protected override async Task OnInitializedAsync() { locations = await Db.Locations.ToArrayAsync(); portsGridView = locations.SelectMany(p => p.Ports).Select(p => PortDetailsGridView.FromPort(p)).ToArray(); }