コード例 #1
0
ファイル: SkipRewriter.cs プロジェクト: drazenzadravec/nequeo
        /// <summary>
        ///
        /// </summary>
        /// <param name="expression"></param>
        /// <param name="dataType"></param>
        /// <returns></returns>
        public static Expression Rewrite(Expression expression, Nequeo.Data.DataType.ConnectionContext.ConnectionDataType dataType)
        {
            SkipRewriter skipRewriter = new SkipRewriter();

            skipRewriter.MappingDataType = dataType;
            return(skipRewriter.Visit(expression));
        }
コード例 #2
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public Product() :
     base(modelItem, Nequeo.Data.DataType.ConnectionContext.ConnectionType.SqlConnection, Nequeo.Data.DataType.ConnectionContext.ConnectionDataType.SqlDataType, new Nequeo.Data.SqlServer.DataAccess())
 {
     OnCreated();
     _connectionType     = Nequeo.Data.DataType.ConnectionContext.ConnectionType.SqlConnection;
     _connectionDataType = Nequeo.Data.DataType.ConnectionContext.ConnectionDataType.SqlDataType;
 }
コード例 #3
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="connectionConfigKey">The database connection configuration key.</param>
 /// <param name="connectionType">The connection type.</param>
 /// <param name="connectionDataType">The connection data type.</param>
 /// <param name="dataAccessProvider">The data access provider.</param>
 public Product(string connectionConfigKey, Nequeo.Data.DataType.ConnectionContext.ConnectionType connectionType, Nequeo.Data.DataType.ConnectionContext.ConnectionDataType connectionDataType, Nequeo.Data.DataType.IDataAccess dataAccessProvider) :
     base(modelItem, connectionType, connectionDataType, dataAccessProvider)
 {
     OnCreated();
     defaultDatabaseConnectionConfigurationKey = connectionConfigKey;
     _connectionType     = connectionType;
     _connectionDataType = connectionDataType;
 }
コード例 #4
0
ファイル: EdmGenericImple.cs プロジェクト: waffle-iron/nequeo
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="configurationDatabaseConnection">The connection string or configuration key.</param>
        /// <param name="connectionType">The database connection type.</param>
        /// <param name="connectionDataType">The database connection query type.</param>
        /// <param name="dataAccessProvider">The data access provider.</param>
        public EdmTransactions(
            string configurationDatabaseConnection,
            Nequeo.Data.DataType.ConnectionContext.ConnectionType connectionType,
            Nequeo.Data.DataType.ConnectionContext.ConnectionDataType connectionDataType,
            IDataAccess dataAccessProvider)
        {
            // Check to see if the critical parameters
            // have been set, throw exception on each.
            if (String.IsNullOrEmpty(configurationDatabaseConnection))
            {
                throw new ArgumentNullException("configurationDatabaseConnection");
            }

            _configurationDatabaseConnection = configurationDatabaseConnection;
            // Create an instance of each type.
            _insertInstance = new InsertEdmGenericBase <TDataContext, TLinqEntity>
                                  (typeof(TLinqEntity).Name, connectionType, connectionDataType, dataAccessProvider);
            _deleteInstance = new DeleteEdmGenericBase <TDataContext, TLinqEntity>
                                  (typeof(TLinqEntity).Name, connectionType, connectionDataType, dataAccessProvider);
            _updateInstance = new UpdateEdmGenericBase <TDataContext, TLinqEntity>
                                  (typeof(TLinqEntity).Name, connectionType, connectionDataType, dataAccessProvider);
            _selectInstance = new SelectEdmGenericBase <TDataContext, TLinqEntity>
                                  (typeof(TLinqEntity).Name, connectionType, connectionDataType, dataAccessProvider);
        }
コード例 #5
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="connectionConfigKey">The database connection configuration key.</param>
 /// <param name="connectionType">The connection type.</param>
 /// <param name="connectionDataType">The connection data type.</param>
 /// <param name="dataAccessProvider">The data access provider.</param>
 public DataContext(string connectionConfigKey, Nequeo.Data.DataType.ConnectionContext.ConnectionType connectionType, Nequeo.Data.DataType.ConnectionContext.ConnectionDataType connectionDataType, Nequeo.Data.DataType.IDataAccess dataAccessProvider) :
     base(connectionConfigKey, connectionType, connectionDataType, dataAccessProvider)
 {
     OnCreated();
 }