static Expression GetIdentifier(ISessionFactory sessionFactory, IEnumerable<ExpressionHolder> expressions, ExpressionHolder e)
		{
			foreach (var holders in expressions)
			{
				if (holders.Tuple == e.Tuple)
				{
					var memberExpression = holders.Expression as MemberExpression;
					if (memberExpression != null)
					{
						var expression = memberExpression.Expression;
						var classMetadata = sessionFactory.GetClassMetadata(expression.Type);
						if (classMetadata != null)
						{
							return ConvertToObject(Expression.PropertyOrField(expression, classMetadata.IdentifierPropertyName));
						}
					}
				}
			}
			return Expression.Constant(null);
		}
 static Expression GetIdentifier(ISessionFactory sessionFactory, IEnumerable <ExpressionHolder> expressions, ExpressionHolder e)
 {
     foreach (var holders in expressions)
     {
         if (holders.Tuple == e.Tuple)
         {
             var memberExpression = holders.Expression as MemberExpression;
             if (memberExpression != null)
             {
                 var expression    = memberExpression.Expression;
                 var classMetadata = sessionFactory.GetClassMetadata(expression.Type);
                 if (classMetadata != null)
                 {
                     return(ConvertToObject(Expression.PropertyOrField(expression, classMetadata.IdentifierPropertyName)));
                 }
             }
         }
     }
     return(Expression.Constant(null));
 }