我根据网站示例编写了以下LiteDB查询代码:
private void QueryFunc()
{
using (var db = new LiteDatabase(@"C:\NewTemp\MyData.db"))
{
var EmployeeCollection = db.GetCollection<Employee>("employeesName");
var Finder = EmployeeCollection.Find(x => x.Name_Last.StartsWith("L")).ToList();
label_LastName.Text = Finder.ToString();
}
}
它运行正常,但它不返回Last Names字符串,而是返回对象名称(System.Collection.Generic.List'[LITEDB.Form1 + Employee])。如何获取'Find'命令来显示字符串?另外,是否有某处显示其余“查找”命令(FindOne,FindAll,FindbyId)所需的过程以字符串格式显示查询结果?