Это код в cshtml.cs файл:
Код: Выделить всё
public SelectList Instructors { get; set; }
public async Task OnGetAsync()
{
var students = from s in _context.User_Profile
select s;
if (!string.IsNullOrEmpty(SearchString))
{
students = students.Where(s => s.FirstName.Contains(SearchString));
}
UserProfile = await students.ToListAsync();
var instructors = from i in _context.Instructor
orderby i.FirstName
select i;
Instructors = new SelectList(instructors, "ID", "FirstName");
}
Код: Выделить всё
-- Select --
Код: Выделить всё
@Model.Instructors

Пожалуйста, посоветуйте...
Подробнее здесь: https://stackoverflow.com/questions/702 ... net-core-r