// // GET: /Cars/ public ActionResult Index() { MongoCursor <Car> carsInDbCursor = CarRentalContext.Cars.FindAll(); /* LINQ example * IEnumerable<Car> cars = carsInDbCursor.AsQueryable().Where(c => c.NumberOfDoors > 3); */ IMongoSortBy sortByCars = SortBy <Car> .Descending(c => c.Make); carsInDbCursor.SetSortOrder(sortByCars); AggregateExamples(); return(View(carsInDbCursor.ConvertAllToViewModels())); }