public virtual async Task <TDto> GetByIdAsync(int id) { var result = await DbContext.Set <TEntity>() .Where(x => x.Id == id) .ProjectTo <TDto>(_mapper.ConfigurationProvider) .SingleAsync(); return(result); }
public virtual async Task <TDto> HandleAsync(TRequest request) { var result = await _dbContext.Set <TEntity>() .Where(x => x.Id == request.Id) .ProjectTo <TDto>(_mapper.ConfigurationProvider) .SingleAsync(); return(result); }