/// <summary>
 /// Update values in TitleIdentifier. Returns an object of type TitleIdentifier.
 /// </summary>
 /// <param name="sqlConnection">Sql connection or null.</param>
 /// <param name="sqlTransaction">Sql transaction or null.</param>
 /// <param name="connectionKeyName">Connection key name located in config file.</param>
 /// <param name="value">Object of type TitleIdentifier.</param>
 /// <returns>Object of type TitleIdentifier.</returns>
 public TitleIdentifier TitleIdentifierUpdateAuto(
     SqlConnection sqlConnection,
     SqlTransaction sqlTransaction,
     string connectionKeyName,
     TitleIdentifier value)
 {
     return TitleIdentifierUpdateAuto(sqlConnection, sqlTransaction, connectionKeyName,
         value.TitleIdentifierID,
         value.IdentifierName,
         value.MarcDataFieldTag,
         value.MarcSubFieldCode);
 }
        /// <summary>
        /// Manage TitleIdentifier object.
        /// If the object is of type CustomObjectBase, 
        /// then either insert values into, delete values from, or update values in TitleIdentifier.
        /// </summary>
        /// <param name="sqlConnection">Sql connection or null.</param>
        /// <param name="sqlTransaction">Sql transaction or null.</param>
        /// <param name="connectionKeyName">Connection key name located in config file.</param>
        /// <param name="value">Object of type TitleIdentifier.</param>
        /// <returns>Object of type CustomDataAccessStatus<TitleIdentifier>.</returns>
        public CustomDataAccessStatus<TitleIdentifier> TitleIdentifierManageAuto(
            SqlConnection sqlConnection,
            SqlTransaction sqlTransaction,
            string connectionKeyName,
            TitleIdentifier value)
        {
            if (value.IsNew && !value.IsDeleted)
            {

                TitleIdentifier returnValue = TitleIdentifierInsertAuto(sqlConnection, sqlTransaction, connectionKeyName,
                    value.IdentifierName,
                        value.MarcDataFieldTag,
                        value.MarcSubFieldCode);

                return new CustomDataAccessStatus<TitleIdentifier>(
                    CustomDataAccessContext.Insert,
                    true, returnValue);
            }
            else if (!value.IsNew && value.IsDeleted)
            {
                if (TitleIdentifierDeleteAuto(sqlConnection, sqlTransaction, connectionKeyName,
                    value.TitleIdentifierID))
                {
                return new CustomDataAccessStatus<TitleIdentifier>(
                    CustomDataAccessContext.Delete,
                    true, value);
                }
                else
                {
                return new CustomDataAccessStatus<TitleIdentifier>(
                    CustomDataAccessContext.Delete,
                    false, value);
                }
            }
            else if (value.IsDirty && !value.IsDeleted)
            {

                TitleIdentifier returnValue = TitleIdentifierUpdateAuto(sqlConnection, sqlTransaction, connectionKeyName,
                    value.TitleIdentifierID,
                        value.IdentifierName,
                        value.MarcDataFieldTag,
                        value.MarcSubFieldCode);

                return new CustomDataAccessStatus<TitleIdentifier>(
                    CustomDataAccessContext.Update,
                    true, returnValue);
            }
            else
            {
                return new CustomDataAccessStatus<TitleIdentifier>(
                    CustomDataAccessContext.NA,
                    false, value);
            }
        }
 /// <summary>
 /// Update values in TitleIdentifier. Returns an object of type TitleIdentifier.
 /// </summary>
 /// <param name="sqlConnection">Sql connection or null.</param>
 /// <param name="sqlTransaction">Sql transaction or null.</param>
 /// <param name="value">Object of type TitleIdentifier.</param>
 /// <returns>Object of type TitleIdentifier.</returns>
 public TitleIdentifier TitleIdentifierUpdateAuto(
     SqlConnection sqlConnection,
     SqlTransaction sqlTransaction,
     TitleIdentifier value)
 {
     return TitleIdentifierUpdateAuto(sqlConnection, sqlTransaction, "BHL", value );
 }
 /// <summary>
 /// Manage TitleIdentifier object.
 /// If the object is of type CustomObjectBase, 
 /// then either insert values into, delete values from, or update values in TitleIdentifier.
 /// </summary>
 /// <param name="sqlConnection">Sql connection or null.</param>
 /// <param name="sqlTransaction">Sql transaction or null.</param>
 /// <param name="value">Object of type TitleIdentifier.</param>
 /// <returns>Object of type CustomDataAccessStatus<TitleIdentifier>.</returns>
 public CustomDataAccessStatus<TitleIdentifier> TitleIdentifierManageAuto(
     SqlConnection sqlConnection,
     SqlTransaction sqlTransaction,
     TitleIdentifier value)
 {
     return TitleIdentifierManageAuto( sqlConnection, sqlTransaction, "BHL", value  );
 }