/// <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="predicate">The where clause predicate string.</param> /// <param name="values">The values associated with the predicate parameters.</param> public AsyncDeleteItemPredicate(IDeleteDataGenericBase <TDataEntity> dataBase, AsyncCallback callback, object state, string predicate, params object[] values) : base(callback, state) { _values = values; _predicate = predicate; _dataBase = dataBase; ThreadPool.QueueUserWorkItem(new WaitCallback(AsyncDeleteThread1)); Thread.Sleep(20); }
/// <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 AsyncDeleteDataEntities(IDeleteDataGenericBase <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); }
/// <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>(IDeleteDataGenericBase <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); }