protected TPrimaryKey GetProxyPrimaryKey(object threadSafeProxy) { var expression = RepositoryExtensions.GetSinglePropertyPrimaryKeyProjectionProperty <TEntity, TProjection, TPrimaryKey>(helperRepository); return(GetProxyPropertyValue(threadSafeProxy, expression)); }