Код: Выделить всё
Member:
Selected Member:
@context.Name
@code
{
private IEnumerable
Peoples;
private IEnumerable _source;
private IEnumerable Source
{
get
{
return _source;
}
set
{
if (_source != value)
{
_source = value;
// Console.WriteLine("Source updated);
}
}
}
private IEnumerable _target;
private IEnumerable Target
{
get
{
return _target;
}
set
{
if (_target != value)
{
_target = value;
}
}
}
protected override async Task OnInitializedAsync()
{
Peoples = await DbContext.People
.Select(pl => new People
{
Id = pl.Id,
Name = pl.Name,
CompanyId = pl.CompanyId,
TypeId = pl.TypeId
}).ToListAsync() ?? new List();
Source = Peoples.Where(pl => pl.CompanyId == selectedCompany && pl.TypeId == selectedPeopleType).ToList();
await base.OnInitializedAsync();
}
}
Подробнее здесь: https://stackoverflow.com/questions/790 ... klist-data
Мобильная версия