I can't figure it out how to make a Read function on mongoDB in asp.net mvc 5. I have this part of code in controller:
public HomeController() {
var mongoClient = new MongoClient(Settings.Default.EmployeesConnectionString);
var database= mongoClient.GetDatabase("football");
var coll = database.GetCollection<BsonDocument>("Footballers");
As you can see I have database and collection paths saved in a variables so it would be easier to navigate. I also tested it out, I managed to create a new collection in mongodb so I assume that this is correct. My question is what should I write further to get a whole collection returned? Should it be in the List? After that I will try to return it in a webpage, so if you have any remarks on this, please let me know also.