Serenity.Data.SqlUpdate.Where C# (CSharp) Method

Where() public method

Adds conditions to WHERE clause of the query.
public Where ( ) : SqlUpdate
return SqlUpdate
        public SqlUpdate Where(params string[] conditions)
        {
            if (conditions == null || conditions.Length == 0)
                throw new ArgumentNullException("conditions");

            foreach (var condition in conditions)
                Where(condition);

            return this;
        }

Same methods

SqlUpdate::Where ( string condition ) : SqlUpdate

Usage Example

Beispiel #1
0
        /// <summary>
        ///   Creates a new SqlUpdate query.</summary>
        /// <param name="row">
        ///   Row with field values to set in new record (must be in TrackAssignments mode).</param>
        public static SqlUpdate ToSqlUpdateById(this IIdRow row)
        {
            if (row == null)
            {
                throw new ArgumentNullException("row");
            }

            var update = new SqlUpdate(row.Table);

            update.Set((Row)row, (Field)(row.IdField));
            update.Where(new Criteria((Field)row.IdField) == row.IdField[(Row)row].Value);

            return(update);
        }
All Usage Examples Of Serenity.Data.SqlUpdate::Where