Created
April 28, 2015 21:41
-
-
Save shersh/e0dfb4f3e4c5a9deb9a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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