what is the best way to transfer DS to Dictioany and vice versa?

  • Thread starter Thread starter ×ורי
  • Start date Start date
×

×ורי

Hi all

1.if in the database I have 2 tables:employee, managers
and I want to transfer them to
dictionary <manager,List<emp>
what is the best way?

2.how can I search late for manager by emp?
thanks
 
×ורי said:
1.if in the database I have 2 tables:employee, managers
and I want to transfer them to
dictionary <manager,List<emp>
what is the best way?

I can see two approaches:

1) just write some code that do a SELECT with a JOIN and
create the data structure.

2) use an ORM that creates a List<Manager,List<Emp>> and
then convert that to Dictionary said:
2.how can I search late for manager by emp?

That would require a Dictionary<Emp, Manager>.

Arne
 
Back
Top