Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
find records that matches a nested array element
using MongoDB.Entities;
using MongoDB.Entities.Core;
using System;
using System.Linq;
namespace StackOverFlow
public class AutoSave : Entity
public string[] Templates { get; set; }
public static class Program
private static void Main()
new DB("test", "localhost");
var guids = new[] {
new AutoSave { Templates = guids }.Save();
var result = DB.Queryable<AutoSave>()
.Where(s => s.Templates.Contains(guids[1]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment