I'm currently working on a fund project and I have it set up so I get the holdings from my database and store in in to a DataTable to process.I've created a function where my Database results are returned as a DataTable  var dtAll = db.GetTable(query)Since a group of accounts have the same holding ie: MSFT, AAPLyou will not get the same information twice only once. then apply the information to all the holdings.My question is it worth it to instead of breaking it down into objects by creating a class List of accounts - > Fund - > holdingor going through LINQAdditional information the actual DB table has everything listing on the holding level with the account coded in the record line (this is how the original set up was before I started at the company)so it be like accountx date MSFT 30 100 ...accountz date MSFT 30 120 ...the process is performing a lot of calculations and data manipulation
Is a an object Necessary or can I still use a DataTable
c#;object oriented;programming practices
Data table/Data sets are a generic type of object.  One will have to write more code to retrieve and set information in a data table.  It's also a very heavy object as opposed to a POCO.For example:  DataTable.table[0].rows[0] etc....Now consider a list of Funds.  Lightweight and specific.var funds = GetFundsFromRepository();var total;for each (fund in funds){   total += fund.Amount;} It's easier for one to see what is going on as opposed to using a Data table.  It's also easier to test as we just have to new up a List of Funds as opposed to creating a data table, populating tables, records, rows, columns, etc.One can use either. However, I prefer the latter as a data table is not a domain specific object.  A Fund is a domain specific object and may make it easier for others to understand the logic involved with your application.