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); }