我在将数据从数据库发送到Controller中的列表时遇到问题.我是C#和MVC的新手,所以任何帮助都会有用!代码如下
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; }
谢谢&节日快乐!!