Beispiel #1
0
 public static bool IsFor(
     this DbModificationClause clause,
     string property)
 {
     return(clause.HasPropertyExpression() &&
            clause.Property().Property.Name == property);
 }
        public static DbPropertyExpression Property(
            this DbModificationClause clause)
        {
            if (clause.HasPropertyExpression())
            {
                var setClause = (DbSetClause)clause;
                return((DbPropertyExpression)setClause.Property);
            }

            const string message = "clause does not contain property expression. " +
                                   "Use HasPropertyExpression method to check if it has property expression.";

            throw new Exception(message);
        }