Hello,

I have an object "Employee". This employees can have "DayOff".

When I do this :

EmployeeRepo emplRepo = new employRepo();
Employee empl = remplRepo.Get(1);

Emmployee has a property IList<DayOff> DayOff

After this Get, empl.DayOff has ALL the dayoff for this person.

How can I limit, the dayoff for the current year, or a specific year
and sort them.

The mapping section in Employee is :
    <bag name="DayOffs" generic="true" inverse="true" cascade="all"
table ="EmployeeDayOff">
      <key column="EmployeeId" foreign-
key="FK_Employee_EmployeeDayOff"/>
      <one-to-many class="EmployeeDayOff"/>
    </bag>

If I change the inverse to false and do this :

EmployeeRepo emplRepo = new employRepo();
Employee empl = remplRepo.Get(1);
empl.DayOff = dayoffRepo.Get(employeeid, currentyear);

What is the best way ?

Thanks,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to