pipalia
pipalia

Reputation: 911

How do I create two columns from one column in a Dataset with Linq?

I have a DataSet which has a Balance column in VB.NET. I would like to break this up into Debit and Credit columns based on whether they are positive or negative value. I am building a DataSet from a propitiatory ODBC connection, where CASE, IF and UNION are not supported. Therefore I will have to retrieve all the data at once into DataSet and then manipulate the DataSet

I am new to Linq, so any tips would be appreciated. Thank you.

Upvotes: 1

Views: 188

Answers (1)

Doug Mitchell
Doug Mitchell

Reputation: 192

You are talking about projection in LINQ terminology. The Select portion of a LINQ statement is where you specify what is returned by the query. I've never used this in such a way to return DataSets but rather POCOs.

Upvotes: 1

Related Questions