I have an anonymous type that is structured as follows:
{Contact = {BO.AgtContact}, Agency = {BO.Agent}}
AgtContact and Agent are classes
I am currently looping over the anonymous type in my main block of code to process its contents.
I would like to extract this out to a method something like
public someReturnType MyMethod(IEnumerable<dynamic> list)
{
Loop over list
var contact = list.AgtContact
contact.field = set field value
End loop
return someReturnType (same as IEnumerable<dynamic> that was passed in)
}
I hope this makes sense. Any help greatly appreciated