當前位置: 首頁>>代碼示例>>C#>>正文


C# dOOdads.BusinessEntity類代碼示例

本文整理匯總了C#中MyGeneration.dOOdads.BusinessEntity的典型用法代碼示例。如果您正苦於以下問題:C# BusinessEntity類的具體用法?C# BusinessEntity怎麽用?C# BusinessEntity使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BusinessEntity類屬於MyGeneration.dOOdads命名空間,在下文中一共展示了BusinessEntity類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SqlClientDynamicQuery

		public SqlClientDynamicQuery(BusinessEntity entity)
			: base(entity)
		{
			
		}
開發者ID:nguyenhuuhuy,項目名稱:mygeneration,代碼行數:5,代碼來源:SqlClientDynamicQuery.cs

示例2: CreateDynamicQuery

 internal abstract DynamicQuery CreateDynamicQuery(BusinessEntity entity);
開發者ID:ivladyka,項目名稱:Ekran,代碼行數:1,代碼來源:BusinessEntity.cs

示例3: Enlist

		/// <summary>
		/// Enlist by the dOOdads architecture when a IDbCommand (SqlCommand is an IDbCommand). The command may or may not be enrolled 
		/// in a transaction depending on whether or not BeginTransaction has been called. Each call to Enlist must be followed by a
		/// call to <see cref="DeEnlist"/>.
		/// </summary>
		/// <param name="cmd">Your SqlCommand, OleDbCommand, etc ...</param>
		/// <param name="entity">Your business entity, in C# use 'this', VB.NET use 'Me'.</param>
		/// <example>
		/// C#
		/// <code>
		/// txMgr.Enlist(cmd, this);
		/// cmd.ExecuteNonQuery();
		/// txMgr.DeEnlist(cmd, this);
		/// </code>
		/// VB.NET
		/// <code>
		/// txMgr.Enlist(cmd, Me)
		/// cmd.ExecuteNonQuery()
		/// txMgr.DeEnlist(cmd, Me)
		/// </code>
		/// </example>
		public void Enlist(IDbCommand cmd, BusinessEntity entity)
		{
			if(txCount == 0 || entity._notRecommendedConnection != null)
			{
				// NotRecommendedConnections never play in dOOdad transactions
				cmd.Connection = CreateSqlConnection(entity);
			}
			else
			{
				string connStr = entity._config;
				if(entity._raw != "") connStr = entity._raw;

				Transaction tx = this.transactions[connStr] as Transaction;

				if(tx == null)
				{
                    IDbConnection sqlConn = CreateSqlConnection(entity);
                    
                    tx = new Transaction();
					tx.sqlConnection = sqlConn;

					if(_isolationLevel != IsolationLevel.Unspecified)
					{
						tx.sqlTx = sqlConn.BeginTransaction(_isolationLevel);
					}
					else
					{
						tx.sqlTx = sqlConn.BeginTransaction();
					}
					this.transactions[connStr] = tx;
				}

                cmd.Connection = tx.sqlConnection;
				cmd.Transaction = tx.sqlTx;
			}
		}
開發者ID:nguyenhuuhuy,項目名稱:mygeneration,代碼行數:57,代碼來源:TransactionMgr.cs

示例4: CreateDynamicQuery

 internal override DynamicQuery CreateDynamicQuery(BusinessEntity entity)
 {
     return new PostgreSqlDynamicQuery(entity);
 }
開發者ID:ivladyka,項目名稱:Ekran,代碼行數:4,代碼來源:PostgreSqlEntity.cs

示例5: OleDbDynamicQuery

 public OleDbDynamicQuery(BusinessEntity entity)
     : base(entity)
 {
 }
開發者ID:ivladyka,項目名稱:Ekran,代碼行數:4,代碼來源:OleDbDynamicQuery.cs

示例6: AggregateClause

 public AggregateClause(BusinessEntity entity)
 {
     this._entity = entity;
 }
開發者ID:menasbeshay,項目名稱:ivalley-svn,代碼行數:4,代碼來源:Branches.cs

示例7: CreateDynamicQuery

		override internal DynamicQuery CreateDynamicQuery(BusinessEntity entity)
		{
			return new OracleClientDynamicQuery(entity);
		}
開發者ID:nguyenhuuhuy,項目名稱:mygeneration,代碼行數:4,代碼來源:OracleClientEntity.cs

示例8: CreateDynamicQuery

 internal override DynamicQuery CreateDynamicQuery(BusinessEntity entity)
 {
     return new SQLiteDynamicQuery(entity);
 }
開發者ID:ivladyka,項目名稱:Ekran,代碼行數:4,代碼來源:SQLiteEntity.cs

示例9: CreateDynamicQuery

		override internal DynamicQuery CreateDynamicQuery(BusinessEntity entity)
		{
			return new VistaDBDynamicQuery(entity);
		}
開發者ID:nguyenhuuhuy,項目名稱:mygeneration,代碼行數:4,代碼來源:VistaDBEntity.cs

示例10: OracleClientDynamicQuery

		public OracleClientDynamicQuery(BusinessEntity entity)
			: base(entity)
		{
				
		}
開發者ID:nguyenhuuhuy,項目名稱:mygeneration,代碼行數:5,代碼來源:OracleClientDynamicQuery.cs

示例11: CreateSqlConnection

		private IDbConnection CreateSqlConnection(BusinessEntity entity)
		{
			IDbConnection cn;

			if(entity._notRecommendedConnection != null)
			{
				// This is assumed to be open
				cn = entity._notRecommendedConnection;
			}
			else
			{
				cn = entity.CreateIDbConnection();

				if(entity._raw != "")
					cn.ConnectionString = entity._raw;
				else
#if(VS2005)
					cn.ConnectionString = ConfigurationManager.AppSettings[entity._config];
#else
                    cn.ConnectionString = ConfigurationSettings.AppSettings[entity._config];
#endif

				cn.Open();
			}

			return cn;
		}
開發者ID:nguyenhuuhuy,項目名稱:mygeneration,代碼行數:27,代碼來源:TransactionMgr.cs

示例12: AddBusinessEntity

		/// <summary>
		/// Called internally by BusinessEntity
		/// </summary>
		/// <param name="entity"></param>
		internal void AddBusinessEntity(BusinessEntity entity)
		{
			if(this.objectsInTransaction == null)
			{
				this.objectsInTransaction = new ArrayList();
			}

			this.objectsInTransaction.Add(entity);
		}
開發者ID:nguyenhuuhuy,項目名稱:mygeneration,代碼行數:13,代碼來源:TransactionMgr.cs

示例13: DeEnlist

		/// <summary>
		/// Each call to Enlist must be followed eventually by a call to DeEnlist.  
		/// </summary>
		/// <param name="cmd"></param>
		/// <param name="entity"></param>
		/// <example>
		/// C#
		/// <code>
		/// txMgr.Enlist(cmd, this);
		/// cmd.ExecuteNonQuery();
		/// txMgr.DeEnlist(cmd, this); 
		/// </code>
		/// VB.NET
		/// <code>>
		/// txMgr.Enlist(cmd, Me)
		/// cmd.ExecuteNonQuery()
		/// txMgr.DeEnlist(cmd, Me)
		/// </code>
		/// </example>
		public void DeEnlist(IDbCommand cmd, BusinessEntity entity)
		{
			if(entity._notRecommendedConnection != null)
			{
				// NotRecommendedConnection never play in dOOdad transactions
				cmd.Connection = null;
			}
			else
			{
				if(txCount == 0)
				{
					cmd.Connection.Dispose();
				}
			}
		}
開發者ID:nguyenhuuhuy,項目名稱:mygeneration,代碼行數:34,代碼來源:TransactionMgr.cs

示例14: VisualFoxProDynamicQuery

		public VisualFoxProDynamicQuery(BusinessEntity entity) : base(entity) { }
開發者ID:nguyenhuuhuy,項目名稱:mygeneration,代碼行數:1,代碼來源:VisualFoxProDynamicQuery.cs

示例15: CreateDynamicQuery

 internal override DynamicQuery CreateDynamicQuery(BusinessEntity entity)
 {
     return new FirebirdSqlDynamicQuery(entity);
 }
開發者ID:ivladyka,項目名稱:Ekran,代碼行數:4,代碼來源:FirebirdSqlEntity.cs


注:本文中的MyGeneration.dOOdads.BusinessEntity類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。