@*Page 1049*@
IDNameDeptLocation
@p.PersonId @p.Surname, @p.Firstname @p.Department?.Name @p.Location?.City, @p.Location?.State
@code { [Inject] public DataContext? Context { get; set; } public IEnumerable? People => Context?.People .Include(p => p.Department) .Include(p => p.Location); } @*Page 1029*@ @* @foreach (Person p in People ?? Enumerable.Empty()) { }
ID Name Dept Location
@p?.PersonId @p?.Surname, @p?.Firstname @p?.Department?.Name @p?.Location?.City, @p?.Location?.State
*@ @*Page 1045*@ @*
IDNameDeptLocation
@foreach (Person p in People ?? Enumerable.Empty()) { @p?.PersonId @p?.Surname, @p?.Firstname @p?.Department?.Name @p?.Location?.City, @p?.Location?.State }
*@ @* *@ @*@code { [Inject] public DataContext? Context { get; set; } public IEnumerable? People => Context?.People .Include(p => p.Department).Include(p => p.Location).Take(ItemCount); public IEnumerable? Cities => Context?.Locations.Select(l => l.City); public string SelectedCity { get; set; } = string.Empty; public string GetClass(string? city) => SelectedCity == city ? "bg-info text-white" : ""; [Parameter] public int ItemCount { get; set; } = 4; [Parameter] public string? SelectTitle { get; set; } public void HandleCustom(string newValue) { SelectedCity = newValue; } }*@ @* @foreach (Person p in People ?? Enumerable.Empty()) { }
ID Name Dept Location
@p?.PersonId @p?.Surname, @p?.Firstname @p?.Department?.Name @p?.Location?.City, @p?.Location?.State
*@ @*@code { [Inject] public DataContext? Context { get; set; } public IEnumerable? People => Context?.People.Include(p => p.Department).Include(p => p.Location); public IEnumerable? Cities => Context?.Locations.Select(l => l.City); public string SelectedCity { get; set; } = string.Empty; public string GetClass(string? city) => SelectedCity == city ? "bg-info text-white" : ""; }*@