当前位置: 首页>>代码示例>>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;未经允许,请勿转载。