Ejemplo n.º 1
0
        public void Add(Activity dailyActivity)
        {
            var types = activityTypeRepository.GetAll();

            var exactType = types.First(x => x.ActivityId == dailyActivity.ActivityType.ActivityId);

            dailyActivity.ActivityType = exactType;

            var roles    = projectRoleTypeRepository.GetAll();
            var roleType = roles.First(x => x.RoleId == dailyActivity.CurrentProjectRoleType.RoleId);

            dailyActivity.CurrentProjectRoleType = roleType;

            var projects     = projectRepository.GetAll();
            var exactProject = projects.First(x => x.ProjectId == dailyActivity.Project.ProjectId);

            dailyActivity.Project = exactProject;

            activityRepository.Add(dailyActivity);
        }
 public IEnumerable <ActivityType> GetAll()
 {
     return(activityTypeRepository.GetAll());
 }