public Hour Add(HourEntryModel hourModel) { var hour = _hourRepository.InsertHourFromModel(hourModel); _hourRepository.Save(); return(hour); }
public Hour Add(HourEntryModel hourModel, string professorUser) { var isAdmin = _userRepository.isAdmin(professorUser); var hour = _hourRepository.InsertHourFromModel(hourModel.AccountId, hourModel.SectionId, hourModel.ProjectId, hourModel.Hour, professorUser, isAdmin); _hourRepository.Save(); return(hour); }