public List <FocusAssignmentViewModel> GetAllFocusAssignments(int employee) { List <FocusAssignmentViewModel> FocusAssignmentViewModels = new List <FocusAssignmentViewModel>(); List <Assigment> targetData = AssignmentService.GetAllFocus(employee); if (targetData != null) { foreach (Assigment target in targetData) { FocusAssignmentViewModel favm = new FocusAssignmentViewModel { Id = target.Id, Beskrivning = target.Beskrivning, Roll = target.Roll, Teknik = target.Teknik, Tid = target.Tid, Uppdrag = target.Uppdrag, Focus = target.Focus }; FocusAssignmentViewModels.Add(favm); } } return(FocusAssignmentViewModels); }