Skip to content

Instantly share code, notes, and snippets.

@shersh
Created April 28, 2015 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shersh/e0dfb4f3e4c5a9deb9a6 to your computer and use it in GitHub Desktop.
Save shersh/e0dfb4f3e4c5a9deb9a6 to your computer and use it in GitHub Desktop.
public class DbActor : ReceiveActor
{
public class Query
{
public Func<Db, IQueryable> Filter;
}
public DbActor()
{
Receive<Query>(query =>
{
using (Db db = new Db())
{
var filter = query.Filter(db).ToListAsync().Result;
Sender.Tell(filter);
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment