예제 #1
0
        /// <summary>
        /// Start the asynchronous query request operation.
        /// </summary>
        /// <param name="dataBase">The base generic data access layer.</param>
        /// <param name="callback">The asynchronous call back method.</param>
        /// <param name="state">The state object value.</param>
        /// <param name="dataEntities">The data entities to delete.</param>
        /// <param name="useRowVersion">Should row version data be used to delete items.</param>
        public AsyncUpdateDataEntities(IUpdateDataGenericBase <TDataEntity> dataBase,
                                       AsyncCallback callback, object state, TDataEntity[] dataEntities, bool useRowVersion)
            : base(callback, state)
        {
            _useRowVersion = useRowVersion;
            _dataEntities  = dataEntities;
            _dataBase      = dataBase;

            ThreadPool.QueueUserWorkItem(new WaitCallback(AsyncDeleteThread1));
            Thread.Sleep(20);
        }
예제 #2
0
        /// <summary>
        /// Get the connection type model.
        /// </summary>
        /// <typeparam name="TDataModel">The data model type</typeparam>
        /// <typeparam name="TModel">The model type</typeparam>
        /// <param name="dataAccess">The data access instance.</param>
        /// <returns>The connection type model</returns>
        public static ConnectionTypeModel GetTypeModel <TDataModel, TModel>(IUpdateDataGenericBase <TModel> dataAccess)
            where TModel : class, new()
        {
            ConnectionTypeModel connectionModel = new ConnectionTypeModel();

            connectionModel.ConnectionDataType = dataAccess.ConnectionDataType;
            connectionModel.ConnectionType     = dataAccess.ConnectionType;
            connectionModel.DataAccessProvider = dataAccess.DataAccessProvider.GetType().AssemblyQualifiedName;
            connectionModel.DatabaseConnection = dataAccess.ConfigurationDatabaseConnection;
            connectionModel.DataObjectTypeName = typeof(TDataModel).AssemblyQualifiedName;
            return(connectionModel);
        }
예제 #3
0
        /// <summary>
        /// Start the asynchronous query request operation.
        /// </summary>
        /// <param name="dataBase">The base generic data access layer.</param>
        /// <param name="callback">The asynchronous call back method.</param>
        /// <param name="state">The state object value.</param>
        /// <param name="dataEntity">The data entity to update.</param>
        /// <param name="predicate">The where clause predicate string.</param>
        /// <param name="values">The values associated with the predicate parameters.</param>
        public AsyncUpdateItemPredicate(IUpdateDataGenericBase <TDataEntity> dataBase,
                                        AsyncCallback callback, object state, TDataEntity dataEntity, string predicate, params object[] values)
            : base(callback, state)
        {
            _dataEntity = dataEntity;
            _values     = values;
            _predicate  = predicate;
            _dataBase   = dataBase;

            ThreadPool.QueueUserWorkItem(new WaitCallback(AsyncDeleteThread1));
            Thread.Sleep(20);
        }
예제 #4
0
 /// <summary>
 /// Override user update operations.
 /// </summary>
 /// <param name="update">The current update data generic provider to override.</param>
 public UserUpdateOverride(IUpdateDataGenericBase <Data.User> update)
     : base(update.ConfigurationDatabaseConnection, update.ConnectionType, update.ConnectionDataType, update.DataAccessProvider)
 {
 }