tags public class Post public string Title {get;set;} public List<string> Tags {get;set;}
} 如果a标签至少有10个Post与之关联,我希望所有的Post都按tag进行分组。有没有可能在LiteDB中用当前类高效地完成这项工作?我乐于接受各种想法。
我有一个JSON格式的字符串,我想将其转换为BSONDocument以便插入到LiteDB数据库中。如何进行转换?我使用的是LiteDB 5.0.0-beta版(我还在LiteDB v4.1.4中测试了它)。BsonMapper.Global.ToDocument(holder.Json);
// bsonDocument returns null in v5, and throws exception in v4
是否可以根据内部属性值对集合进行分组?在不使用Linq创建新对象的情况下,我如何做到这一点。或者,我需要在分组进程之前创建匿名对象。public class Item public int Id { get; set; }}public class ItemInv public int wid {get; set;}