In my app i am now facing several issues of where to perform some calculations. I am using Repository Pattern... (at least trying to) Here's how it works.. each Employee has many Physical_Exams.. and for each employee I need to be able to get his Initial Body_Mass_Index and his Last Body_Max_Index... of course each exam has a Date attribute... so for each employee I should be able to get these values
So my question is.. should the appropiate method be called like this
Employee employee=EmployeeRepository.GetbyId(id);
float initial_mass_index=employee.GetInitialMassIndex();
or like this?
Employee employee=EmployeeRepository.GetbyId(id);
float initial_mass_index=EmployeeRepository.GetInitialMassIndex(employee);
I think it's worth mentioning that each Employee has a company so for each company I will also need to calculate the Average Initial Mass Index of its employees... The question is the same... should the method that calculates this Average be defined in the Company Partial class or in the CompanyRepository??
Please Help!