コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="connection"></param>
        /// <param name="transaction"></param>
        /// <returns></returns>
        public bool Register(UserAttributeEntity entity, DbConnection connection, DbTransaction transaction)
        {
            if (UserAttributesGateway.Update(entity, connection, transaction) == 1)
            {
                return(true);
            }

            if (UserAttributesGateway.Insert(entity, connection, transaction) == 1)
            {
                return(true);
            }

            return(false);
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="connection"></param>
        /// <param name="transaction"></param>
        /// <returns></returns>
        public bool Create(UserAttributeEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var created = UserAttributesGateway.Insert(entity, connection, transaction);

            return(created == 1);
        }