With PLINQO, the future is now! Build up a list of queries for the data that you need and the first time any of the results are accessed, PLINQO will retrieve all the data in one round trip to the database server. Reducing the number of trips to the database is a great optimization that makes for smoother, faster running applications. Using this feature is as simple as appending .Future() to the end of your queries. Here is a quick sample.
// build up multiple queries
var q1 = db.User
.ByEmailAddress("one@test.com")
.Future();
var q2 = db.Task
.Where(t => t.Summary == "Test")
.Future();
// this triggers the loading of all the future queries
var users = q1.ToList();
No data is retrieved until q1.ToList(); is executed. At that time, PLINQO knows to execute all the future queries automatically. The data is both batched and not retrieved until it is needed.
Not only can you queue up execution of queries for the future, the results can be cached as well. Again, PLINQO makes things easy. Here's a quick look at FutureCache.
// cache these results for 120 seconds
var q1 = db.User
.ByEmailAddress("one@test.com")
.FutureCache(120);
var q2 = db.Task
.Where(t => t.Summary == "Test")
.FutureCache(120);
// this triggers the loading of all the future queries
var users = q1.ToList();
Queuing up for the future has never been easier!