I have a problem sending data from the database to a list in the Controller. I am new to C# and MVC so any help will be useful! Code follows
public static List<FilterTree> GetAllUsers()
{
FilterTreeDBContext db = new FilterTreeDBContext();
var userList = new List<FilterTree>();
var device = new FilterTree();
//This is the line where I get the error
device.ID = from a in db.FilterTree select a.ID;
userList.Add(device);
return userList;
}
Thanks & Happy Holidays!! :)