Replace Mapper.Map<IEnumerable<TViewModel>>(query) by query.Project().To<TViewModel>().ToList()
Replace Mapper.Map<> with .Project().To<>().ToList()