/// <summary>
        /// Create modify record
        /// </summary>
        /// <param name="modify">Modify expression</param>
        /// <param name="query">Query object</param>
        /// <param name="activationOption">Activation option</param>
        /// <returns>Return a new default activation record</returns>
        public static DefaultActivationRecord <TEntity, TDataAccess> CreateModifyRecord(IModify modify, IQuery query, ActivationOption activationOption)
        {
            var record = CreateRecord(ActivationOperation.ModifyByExpression, null, activationOption);

            record.ModifyExpression = modify;
            record.Query            = query;
            return(record);
        }
 /// <summary>
 /// Create remove object record
 /// </summary>
 /// <param name="identityValue">Identity value</param>
 /// <param name="activationOption">Activation option</param>
 /// <returns>Return a new default activation record</returns>
 public static DefaultActivationRecord <TEntity, TDataAccess> CreateRemoveObjectRecord(string identityValue, ActivationOption activationOption)
 {
     if (string.IsNullOrWhiteSpace(identityValue))
     {
         throw new EZNEWException("identityValue is null or empty");
     }
     return(CreateRecord(ActivationOperation.RemoveByObject, identityValue, activationOption));
 }
        /// <summary>
        /// Create remove by condition record
        /// </summary>
        /// <param name="query">Query object</param>
        /// <param name="activationOption">Activation option</param>
        /// <returns>Return a new default activation record</returns>
        public static DefaultActivationRecord <TEntity, TDataAccess> CreateRemoveByConditionRecord(IQuery query, ActivationOption activationOption)
        {
            var record = CreateRecord(ActivationOperation.RemoveByCondition, null, activationOption);

            record.Query = query;
            return(record);
        }
        /// <summary>
        /// Create a activation record
        /// </summary>
        /// <param name="operation">Activation operation</param>
        /// <param name="identityValue">Object identity value</param>
        /// <param name="activationOption">Activation option</param>
        /// <returns>Return a new default activation record</returns>
        public static DefaultActivationRecord <TEntity, TDataAccess> CreateRecord(ActivationOperation operation, string identityValue, ActivationOption activationOption)
        {
            var record = new DefaultActivationRecord <TEntity, TDataAccess>()
            {
                Operation         = operation,
                IdentityValue     = identityValue,
                DataAccessService = typeof(TDataAccess),
                EntityType        = typeof(TEntity)
            };

            activationOption        = activationOption ?? ActivationOption.Default;
            record.ActivationOption = activationOption;
            if (activationOption.ForceExecute)
            {
                record.RecordIdentity = Guid.NewGuid().ToString();
            }
            else
            {
                switch (operation)
                {
                case ActivationOperation.SaveObject:
                case ActivationOperation.RemoveByObject:
                    record.RecordIdentity = string.Format("{0}_{1}", typeof(TEntity).GUID, identityValue);
                    break;

                default:
                    record.RecordIdentity = Guid.NewGuid().ToString();
                    break;
                }
            }
            return(record);
        }