Źródło danych jest nieprawidłowym typem. Musi to być IListSource, IEnumerable lub IDataSource

Źródło danych jest nieprawidłowym typem. Musi to być IListSource, IEnumerable lub IDataSource. Błąd jest wyświetlany, gdy wiążę widok siatki

var list = dal.GetEmployeebyName(name);
GridViewEmployee.DataSource = list;
GridViewEmployee.DataBind();

mam zapytanie

public EmployeeInfo GetEmployeebyName(String name)
{
    using (var context = new HRMSEntities())
    {
        return context.EmployeeInfo.FirstOrDefault(e => e.FName == name);
    }
}

questionAnswers(3)

yourAnswerToTheQuestion