2

I'm using the MongoDB C# driver and I would like to do things similar to https://stackoverflow.com/a/15248058/106866.

So I created an entity like this:

using System.Collections.Generic;
using MongoDB.Driver;
using MongoRepository;
using MongoDB.Bson;
using MongoDB;

...

public class Movie : Entity {
    public string Title { get; set; }
    public string Synopsis { get; set; }
    public List<DBRef> Likes { get; set; }
}

But the DBRef gives the following error:

The type or namespace 'DBRef' could not be found.

I am using version 1.8.1.20 of the driver and version 1.5.1.0 of MongoRepository.

What namespace do I have to reference to get DBRef?

Community
  • 1
  • 1
jao
  • 18,273
  • 15
  • 63
  • 96

1 Answers1

1

Seems that the type in the linked question is wrong and should actually be MongoDBRef

jao
  • 18,273
  • 15
  • 63
  • 96