public IEnumerable <UserModel> GetMyUsers(int carrierId) { var mapper = new MapperConfiguration(cfg => cfg.CreateMap <User, UserModel>()).CreateMapper(); IEnumerable <User> people = _carrierService.GetMyUsers(carrierId); IEnumerable <UserModel> peopleShort; peopleShort = mapper.Map <IEnumerable <User>, IEnumerable <UserModel> >(people); return(peopleShort); }