public List <UnitPrice> GetAllPrices() { using (var session = new MongoSession <UnitPrice>()) { if (AllPrices != null && AllPrices.Count() > 0) { return(AllPrices); } try { var collection = session.FindAll <UnitPrice>(); AllPrices = collection.Find(new BsonDocument()).ToList(); } catch (TimeoutException) { } return(AllPrices); } }