datatable iqueryable c# linq

77

datatable iqueryable c# linq -

            DataTable dataTable = GetDataTable();
 
                var importdata = from row in dataTable.AsEnumerable()
                            select new ImportRow()
                            {
                                GroupExtID = row.Field<int>(SubjectsImportStructure.PID),
                                ExtID = row.Field<int>(SubjectsImportStructure.ID),
                                Condition = row.Field<int>(SubjectsImportStructure.Condition),
                                IC = row.Field<string>(SubjectsImportStructure.IC),
                                RC = row.Field<string>(SubjectsImportStructure.RC),
                            };
 
            IQueryable<IImportRow> data = importdata as IQueryable<IImportRow>;

Comments

Submit
0 Comments