次のlinqクエリを実行しました
var results = from myRow in QCAllDataSet.DataTable1.AsEnumerable()
where myRow.Field<String>("ESRNumber") == value
select new ESR(myRow.ESRNumber,
myRow.CreationDate,
myRow.Subsystem,
myRow.Name,
myRow.Product,
myRow.Version,
myRow.ESRStatus,
myRow.Owner,
myRow.Priority,
myRow.LastPHNote,
myRow.LastPHNoteDate,
myRow.LastPHNoteUser,
myRow.DaysFromLastUpdate,
myRow.Customer,
myRow.T2Owner,
myRow.T2Group,
myRow.comment,
myRow.ESRAge);
そして、オブジェクトに変換results
したいESR
のようなsomthigESR t=(ESR)results
しかし、次のエラーが発生します。
タイプ'System.Data.EnumerableRowCollectionをESRに変換できません
これをどのようにCasする必要がありますか?