public static TEntity ById <TEntity>(this ILinqProvider linqProvider, int id) where TEntity : class, IHasId <int> => linqProvider.GetQueryable <TEntity>().ById(id);
public TResult Execute(TKey specification) => _mapper.Project<TEntity, TResult>(_linqProvider .GetQueryable<TEntity>()) .SingleOrDefault(x => x.Id.Equals(specification));
public virtual TResult Ask(TKey specification) => Projector.Project <TEntity, TResult>(LinqProvider .GetQueryable <TEntity>() .Where(x => specification.Equals(x.Id))) .SingleOrDefault();
protected virtual IQueryable <TDest> GetQueryable(TSpecification spec) => LinqProvider .GetQueryable <TSource>() .ApplyIfPossible(spec) .Project <TSource, TDest>(Projector) .ApplyIfPossible(spec);