コード例 #1
0
		public void BulkAdd(InvalidAssigneesNotificationCollection data)
		{
			if (data.Count == 0)
				return;

			ORMappingItemCollection mappings = ORMapping.GetMappingInfo<InvalidAssigneesNotification>();

			StringBuilder sqlStrB = new StringBuilder();

			foreach (InvalidAssigneesNotification item in data)
			{
				if (sqlStrB.Length > 0)
					sqlStrB.Append(TSqlBuilder.Instance.DBStatementSeperator);

				sqlStrB.Append(ORMapping.GetInsertSql(item, mappings, TSqlBuilder.Instance));
			}

			DbHelper.RunSqlWithTransaction(sqlStrB.ToString(), this.GetConnectionName());
		}
コード例 #2
0
        public void BulkAdd(InvalidAssigneesNotificationCollection data)
        {
            if (data.Count == 0)
            {
                return;
            }

            ORMappingItemCollection mappings = ORMapping.GetMappingInfo <InvalidAssigneesNotification>();

            StringBuilder sqlStrB = new StringBuilder();

            foreach (InvalidAssigneesNotification item in data)
            {
                if (sqlStrB.Length > 0)
                {
                    sqlStrB.Append(TSqlBuilder.Instance.DBStatementSeperator);
                }

                sqlStrB.Append(ORMapping.GetInsertSql(item, mappings, TSqlBuilder.Instance));
            }

            DbHelper.RunSqlWithTransaction(sqlStrB.ToString(), this.GetConnectionName());
        }