Try to use
DataTable.LoadDataRow Method (System.Data) | Microsoft Docs[
^] together with
DataTableExtensions.CopyToDataTable Method (System.Data) | Microsoft Docs[
^].
Note: you have to create a desired datatable first!
DataTable destdt = new DataTable();
destdt.Columns.AddRange(new DataColumn[]
{
new DataColumn("Field1", typeof(int)),
new DataColumn("Field2", typeof(string)),
...
new DataColumn("FieldN", typeof(string)),
});
destdt = oContext.systevents.AsEnumerable()
.Where(r => r.login == "sara")
.Select(x => destdt.LoadDataRow(new object[]
{
x.Field1,
x.Field2,
...
x.FieldN
}, false)
.CopyToDataTable();
For further details, please see:
How to: Implement CopyToDataTable<T> Where the Generic Type T Is Not a DataRow | Microsoft Docs[
^]