コード例 #1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="connection"></param>
        /// <param name="transaction"></param>
        /// <returns></returns>
        public static int Insert(UserHistoryEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var command = KandaTableDataGateway._factory.CreateCommand(connection, transaction);

            command.CommandText = @"usp_InsertUserHistories";

            KandaDbDataMapper.MapToParameters(command, entity);

            var result = KandaTableDataGateway._factory.CreateParameter(KandaTableDataGateway.RETURN_VALUE, DbType.Int32, sizeof(int), ParameterDirection.ReturnValue, DBNull.Value);
            command.Parameters.Add(result);

            command.ExecuteNonQuery();

            return (int) result.Value;
        }
コード例 #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="entity"></param>
 public UserHisotryAttributes(UserHistoryEntity entity)
 {
     this._entity = entity;
 }
コード例 #3
0
 /// <summary>
 /// コンストラクター。
 /// </summary>
 /// <param name="entity"></param>
 public UserHistory(UserHistoryEntity entity)
 {
     this._entity = entity;
     this.Attributes = new Collection<UserHistoryAttributeEntity>();
 }