I did the following linq query
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);
And I would like to convert results
to ESR
Object
somthig like ESR t=(ESR)results
but I get the following error:
Cannot convert type 'System.Data.EnumerableRowCollection to ESR
How should I Cas this?