Linked Questions

1 vote
2 answers
3k views

How can I convert the result of a LINQ query where I select some columns of a DataTable to a DataTable again? DataTable dtN = new DataTable(); dtN.Columns.Add("Id"); dtN.Columns.Add("Name"); dtN....
Pankaj Kumar's user avatar
4 votes
3 answers
3k views

I have a linq to sql database. Very simplified we have 3 tables, Projects and Users. There is a joining table called User_Projects which joins them together. I already have a working method of ...
Chris James's user avatar
  • 11.8k
0 votes
3 answers
2k views

I have created a web service using JSON and REST. What I want to know is how to output contents of a local database using the service? I am using Visual Studio 2015, ASP.NET Web Forms and LINQ ...
Jordan's user avatar
  • 97
3 votes
2 answers
2k views

I have a linq query which is calculating particular data. Now I want that query to be typecasted to DataTable. Here is the query : var query = dt.AsEnumerable() .GroupBy(row => new { ...
Harshit's user avatar
  • 5,187
1 vote
2 answers
5k views

The linq query is returning result in form of {DataRow Job1, DataRow Run}. How can i convert JoinResult into a DataTable . var JoinResult = (from Job1 in Jobdata.AsEnumerable() join ...
Pratha's user avatar
  • 21
0 votes
2 answers
898 views

For Example, If I have the following datatable, Location First name Pincode Manager Sydney John 123 Brian New York Larry 456 Sherry Chicago Meg 789 Linda Dallas Mark 012 Cooper Sydney Jack 123 Brian ...
Shashwat Singh's user avatar
0 votes
3 answers
1k views

I have this query: var smallExchangeReport = from ex in exchangeProgReport where !string.IsNullOrEmpty(ex.comment) group ...
Michael's user avatar
  • 13.7k
1 vote
0 answers
137 views

I want to collect all rows and pass it to datatable. My linq query: var queryAll = from all in db.tblMake select all ; DataTable dt = new DataTable(); How can i pass the queryAll into datatable dt? ...
black's user avatar
  • 171
0 votes
0 answers
65 views

I have problem when copy query linq to same datatable. DataTable dt_result = filterkontrak.CopyToDataTable(); var query = from q in dt_result.AsEnumerable() select ...
Roberts's user avatar
  • 53
0 votes
1 answer
40 views

enter image description hereI have this code for grouping and suming column: var groupedData = from b in showit.AsEnumerable() group b by b.Field<string>("Key") into g ...
sammy ben menahem's user avatar