public static TextContent ToContent(this BsonDocument doc) { if (doc == null) { return(null); } TextContent content = new TextContent(); foreach (var item in doc) { if (item.Name != "_id" && !IsCaseInsensitiveFieldName(item.Name)) { content[item.Name] = BsonHelper.GetValue(doc[item.Name]); } } return(content.ConvertToLocalTime()); }