コード例 #1
0
        public UpdateFollowingBuilder <T> Update <T>(UpdateDeclaration <T> declaration)
        {
            UpdateClause updateClause = new UpdateClause(typeof(T).Name, declaration.GetUpdateItems());

            _clauses.Add(updateClause);

            return(new UpdateFollowingBuilder <T>(_clauses));
        }
コード例 #2
0
        public UpdateFollowingBuilder <T> Update <T>(Expression <Func <UpdateDeclaration <T>, UpdateDeclaration <T> > > expression)
        {
            UpdateDeclaration <T> declaration = new UpdateDeclaration <T>();

            declaration = expression.Compile().Invoke(declaration);

            return(Update(declaration));
        }
コード例 #3
0
 public static UpdateDeclaration <T> Set <T>(this UpdateDeclaration <T> declaration, Expression <Func <T, object> > fieldExpression, object value, Func <object, bool> setCondition)
 {
     if (setCondition(value))
     {
         return(declaration.Set(fieldExpression, value));
     }
     return(declaration);
 }