public ListDelegationForListVm GetAllDelegationsForListByStatus(int statusId) { var delegations = _delegationRepo.GetDelegationsByStatus(statusId).ProjectTo <DelegationForListVm>(_mapper.ConfigurationProvider).ToList(); var delegationsVm = new ListDelegationForListVm() { Delegations = delegations, Count = delegations.Count }; return(delegationsVm); }
public ListDelegationForListVm GetDelegationsByEmployee(int id) { var delegations = _delegationRepo.GetDelegationsByEmployee(id).ProjectTo <DelegationForListVm>(_mapper.ConfigurationProvider).ToList(); var delegationsVm = new ListDelegationForListVm() { Delegations = delegations, Count = delegations.Count }; return(delegationsVm); }