Ejemplo n.º 1
0
        public async Task <TDto> GetSingleAsync <TEntity, TDto>(Expression <Func <TEntity, bool> > expression,
                                                                bool include = false) where TEntity : class where TDto : class
        {
            if (include)
            {
                _dbRead.Include <TEntity>();
            }
            var entity = await _dbRead.GetSingleAsync(expression);

            return(_mapper.Map <TDto>(entity));
        }