예제 #1
0
        public IEnumerable <TViewModel> Find(Expression <Func <TViewModel, bool> > predicate)
        {
            var resultBody      = Expression.Convert(predicate.Body, typeof(TEntity));
            var domainPredicate = Expression.Lambda <Func <TEntity, bool> >(resultBody, predicate.Parameters);

            return(iMapper.Map <IEnumerable <TEntity>, IEnumerable <TViewModel> >(domainService.Find(domainPredicate)));
        }