Working DataSets with LINQ?

In this sample I build a datatable and I have a list of name objects that was queried from SQL using Linq to SQL. Loop through the List of name objects building an object array from each of the fields. Then add that array to the datatable.

If memory is an issue, I would avoid using a datatable altogether. That datatable will generally use more memory than a generic list public void LoadStandardizedNames(List names) { using (DataTable table = CreateNamesTable()) { names. ForEach(name => table.

LoadDataRow(new object { name. BatchId, name. FirstName, name.

MiddleName, name. LastName, name. NameSuffix, name.

Gender, name. ChangeCode, }, true)); } }.

In this sample I build a datatable and I have a list of name objects that was queried from SQL using Linq to SQL. Loop through the List of name objects building an object array from each of the fields. Then add that array to the datatable.

If memory is an issue, I would avoid using a datatable altogether. That datatable will generally use more memory than a generic list. Public void LoadStandardizedNames(List names) { using (DataTable table = CreateNamesTable()) { names.

ForEach(name => table. LoadDataRow(new object { name. BatchId, name.

FirstName, name. MiddleName, name. LastName, name.

NameSuffix, name. Gender, name. ChangeCode, }, true)); } }.

Thanks, this was I looking for stop using TableAdapters – Angel Escobedo Sep 4 '09 at 15:41.

In this sample I build a datatable and I have a list of name objects that was queried from SQL using Linq to SQL. Loop through the List of name objects building an object array from each of the fields. Then add that array to the datatable.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions