0
Have the following list
List<EmployeeTotal> totals = Context.Database.SqlQuery<EmployeeTotal>(query).ToList();
I want to transform all objects in the list totals
on a new list of the type
List<EmployeeTotalAdapter> totalsAdapter;
for this conversion I use the class builder itself EmployeeTotalAdapter
receiving an object of the type EmployeeTotal
I was thinking of using the foreach with lambda to add and generate conversions
List<EmployeeTotalAdapter> totalsAdapter = new List<EmployeeTotalAdapter>();
totalsAdapter.Add(totals.ForEach(t => new EmployeeTotalAdapter(t)));
However it does not work informs; Argument1: cannot Convert from void to Employeetotaladapter
it is possible to do something like this ?
I was told that the order of the factors did not alter the result hehehe, so release I accept the reply thank you very much
– Jhonatan Jorge de Lima
hahaha in this case makes a difference yes. Quiet xd
– Jéf Bueno