コード例 #1
0
        public static int Update(RoleEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var command = KandaTableDataGateway._factory.CreateCommand(connection, transaction);

            command.CommandText = @"usp_UpdateRoles";

            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>
        /// <param name="connection"></param>
        /// <param name="transaction"></param>
        /// <returns></returns>
        public bool Update(RoleEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var updated = RolesGateway.Update(entity, connection, transaction);

            return (updated == 1);
        }
コード例 #3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="connection"></param>
        /// <param name="transaction"></param>
        /// <returns></returns>
        public bool Create(RoleEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var created = RolesGateway.Insert(entity, connection, transaction);

            return (created == 1);
        }
コード例 #4
0
ファイル: Role.cs プロジェクト: kkkkkkaaaaaa/kkkkkkaaaaaa
 /// <summary>
 /// 
 /// </summary>
 /// <param name="entity"></param>
 public Role(RoleEntity entity)
 {
     this._entity = entity;
     this.Memberships = new Collection<long>();
     this.Authorizations = new Collection<long>();
 }