Exemplo n.º 1
0
        public Repository(IDataAccessAdapterEx adapter, FunctionMappingStore functionMappingStore)
        {
            this.adapter = adapter;
            this.functionMappingStore = functionMappingStore;

            this.FilesToDeleteOnCommit = new List <string>();
            this.RemovedEntitiesTrackerCollectionsToClearOnCommit = new List <IEntityCollection2>();
        }
Exemplo n.º 2
0
 /// <summary>CTor. If you're executing the queries created with this meta-data inside a transaction, pass a live ITransaction object to this ctor.</summary>
 /// <param name="transactionToUse">the transaction to use in queries created with this meta-data</param>
 /// <param name="customFunctionMappings">The custom function mappings to use. These take higher precedence than the ones in the DQE to use.</param>
 /// <remarks> Be aware that the ITransaction object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data
 /// till they go out of scope.</remarks>
 public LinqMetaData(ITransaction transactionToUse, FunctionMappingStore customFunctionMappings)
 {
     this.TransactionToUse       = transactionToUse;
     this.CustomFunctionMappings = customFunctionMappings;
 }
Exemplo n.º 3
0
 /// <summary>CTor which accepts an IDataAccessAdapter implementing object, which will be used to execute queries created with this metadata class.</summary>
 /// <param name="adapterToUse">the IDataAccessAdapter to use in queries created with this meta data</param>
 /// <param name="customFunctionMappings">The custom function mappings to use. These take higher precedence than the ones in the DQE to use.</param>
 /// <remarks> Be aware that the IDataAccessAdapter object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data
 /// till they go out of scope.</remarks>
 public LinqMetaData(IDataAccessAdapter adapterToUse, FunctionMappingStore customFunctionMappings)
 {
     _adapterToUse           = adapterToUse;
     _customFunctionMappings = customFunctionMappings;
 }
Exemplo n.º 4
0
        public DataScope <TSessionInfo, TMetadata> GetDataScope(IDataAccessAdapter adapter, TSessionInfo sessionInfo)
        {
            FunctionMappingStore functionMappings = null;

            return(GetDataScope(adapter, sessionInfo, functionMappings));
        }
Exemplo n.º 5
0
        public DataScope <TSessionInfo, TMetadata> GetDataScope(IDataAccessAdapter adapter, TSessionInfo sessionInfo, FunctionMappingStore functionMappings, UnitOfWork2 uow)
        {
            TMetadata md = new TMetadata();

            ReflectionHelper.SetPropertyValue(md, "AdapterToUse", adapter);

            if (functionMappings != null)
            {
                ReflectionHelper.SetPropertyValue(md, "CustomFunctionMappings", functionMappings);
            }

            var output = new DataScope <TSessionInfo, TMetadata>()
            {
                Adapter     = adapter,
                Metadata    = md,
                UnitOfWork  = uow,
                SessionInfo = sessionInfo
            };

            return(output);
        }
Exemplo n.º 6
0
        public DataScope <TSessionInfo, TMetadata> GetDataScope(IDataAccessAdapter adapter, TSessionInfo sessionInfo, FunctionMappingStore functionMappings)
        {
            var uow = new UnitOfWork2();

            return(GetDataScope(adapter, sessionInfo, functionMappings, uow));
        }
 /// <summary>CTor which accepts an IDataAccessAdapter implementing object, which will be used to execute queries created with this metadata class.</summary>
 /// <param name="adapterToUse">the IDataAccessAdapter to use in queries created with this meta data</param>
 /// <param name="customFunctionMappings">The custom function mappings to use. These take higher precedence than the ones in the DQE to use.</param>
 /// <remarks> Be aware that the IDataAccessAdapter object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data
 /// till they go out of scope.</remarks>
 public LinqMetaData(IDataAccessAdapter adapterToUse, FunctionMappingStore customFunctionMappings)
 {
     _adapterToUse = adapterToUse;
     _customFunctionMappings = customFunctionMappings;
 }
Exemplo n.º 8
0
 /// <summary>CTor. If you're executing the queries created with this meta-data inside a transaction, pass a live ITransaction object to this ctor.</summary>
 /// <param name="transactionToUse">the transaction to use in queries created with this meta-data</param>
 /// <param name="customFunctionMappings">The custom function mappings to use. These take higher precedence than the ones in the DQE to use.</param>
 /// <remarks> Be aware that the ITransaction object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data
 /// till they go out of scope.</remarks>
 public LinqMetaData(ITransaction transactionToUse, FunctionMappingStore customFunctionMappings)
 {
     _transactionToUse = transactionToUse;
     _customFunctionMappings = customFunctionMappings;
 }