public TProjection FindLocalProjectionByKey(TPrimaryKey primaryKey) { var primaryKeyEqualsExpression = RepositoryExtensions.GetProjectionPrimaryKeyEqualsExpression <TEntity, TProjection, TPrimaryKey>(Repository, primaryKey); return(Entities.AsQueryable().FirstOrDefault(primaryKeyEqualsExpression)); }