Example #1
0
        /// <summary>
        /// Creates a shallow copy of this object
        /// </summary>
        public static CacheInvalidate Clone(Gravitybox.Datastore.EFDAL.Entity.CacheInvalidate item)
        {
            var newItem = new CacheInvalidate();

            newItem.AddedDate    = item.AddedDate;
            newItem.Count        = item.Count;
            newItem.Reason       = item.Reason;
            newItem.RepositoryId = item.RepositoryId;
            newItem.RowId        = item.RowId;
            newItem.Subkey       = item.Subkey;
            return(newItem);
        }
Example #2
0
 /// <summary>
 /// Update the specified field that matches the Where expression with the new data value
 /// </summary>
 /// <param name="select">The field to update</param>
 /// <param name="where">The expression that determines the records selected</param>
 /// <param name="newValue">The new value to set the specified field in all matching records</param>
 /// <param name="connectionString">The database connection string</param>
 /// <returns>The number of records affected</returns>
 public static int UpdateData <TSource>(Expression <Func <Gravitybox.Datastore.EFDAL.CacheInvalidateQuery, TSource> > select, Expression <Func <Gravitybox.Datastore.EFDAL.CacheInvalidateQuery, bool> > where, Gravitybox.Datastore.EFDAL.Entity.CacheInvalidate newValue, string connectionString)
 {
     return(BusinessObjectQuery <Gravitybox.Datastore.EFDAL.Entity.CacheInvalidate, Gravitybox.Datastore.EFDAL.CacheInvalidateQuery, TSource> .UpdateData(select : select, where : where, newValue : newValue, leafTable : "CacheInvalidate", getField : GetDatabaseFieldName, hasModifyAudit : false, connectionString : connectionString));
 }