public class Foo
{
public int Id { get; set; }
public int UserId { get; set; }
}
This appears to be the way to do this asynchronously:
DatabaseContext db = new DatabaseContext();
Foo foo = await db.Foos.FindAsync(fooid);
How does one asynchronously get all of the Foos for a specific user based on UserId's value?
Assuming you are using Entity Framework 6.0 (prerelease):
var userId = ...;
var foos = await db.Foos.Where(x => x.UserId == userId).ToListAsync();