私はエンティティ フレームワークと linq を初めて使用するため、エンティティ フレームワークや linq についてあまり知りません。現在、次の例外に直面していますAn error occurred while executing the command definition. See the inner exception for details.
:
foreach (var items in query)
{
var outtime= from x in con.CHECKINOUTs
select x;
}
しかし、foreach ループの外側でクエリを実行すると、完全に機能します。
var outtime= from x in con.CHECKINOUTs
select x;
私がする必要があるのは、クエリの各項目に対して、outtime に基づいて別のフィールドを追加する必要があることです。
何をすべきか教えてください。および例外に関する詳細情報を取得する方法An error occurred while executing the command definition. See the inner exception for details.