I have an object list, containing objects like:
Userobject{
username
userage
...
userrolesList // is a List<userrole>
}
userrole{
rolid
rolname
rolcommission
}
userrolesList can have one or more userroleobjects.
I need to send this list to another system, but the other system only accepts a list of objects like:
Userobject{
username
userage
...
userroleobject // is a userrole object
}
userrole{
rolid
rolname
rolcommission
}
In this case if one user have 10 roles I need to send 10 different objects to the other system. Any suggestion how I can make this easily and not affect the performance?
This is pretty easy with LINQ query syntax: