私は Entity Framework を初めて使用し、ExecuteReader に CommandBehavior.SequentialAccess が必要な理由を理解していません。以下は私のコードです..
using (var conn = new EntityConnection("name=EFRecipesEntities"))
{
Console.WriteLine("Customers...");
var cmd = conn.CreateCommand();
conn.Open();
cmd.CommandText = @"select c.Name, C.Email from
EFRecipesEntities.Customers as c";
using (var reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess))
{
while (reader.Read())
{
Console.WriteLine("{0}'s email is: {1}",
reader.GetString(0), reader.GetString(1));
}
}
}
どんな助け..