AsQueryable Linq Condition and BsonDocument Filter

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.7.3
    • Component/s: API
    • Environment:
      ASP.net Core / WEB API
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hi All,

         I have one Model Class its ID element contain BsonDocument  and rest of the properties are normal BsonElement ,i would like to Get the information from the DB with normal Linq Condition and Filter inside the BsonDocument also , Please let me know how can i do that

      Eg : 
      Var Items = Collection.AsQueryable<Tclass>().Where(p=> p.FirstName="sd" && p.Id.Country=="sd").ToList()

      Model :

      [BsonElement("ID")]
      public BsonDocument Id { get; set; }-- ID Contains / Address / Place /Country etc 

      [BsonElement("FirstName")]
      public string FirstName{ get; set; }

      Thanks 
      SUJIL T

              Assignee:
              Wan Bachtiar
              Reporter:
              SUJIL
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: