상속: System.Attribute
        public void ConstructorSetsNameDbTypeToNullAndAllowInsertAndAllowUpdateToTrue()
        {
            var columnAttribute = new ColumnAttribute("ObjectID");

            Assert.Equal("ObjectID", columnAttribute.Name);
            Assert.True(columnAttribute.AllowInsert);
            Assert.True(columnAttribute.AllowUpdate);
        }
        public void ConstructorSetsAllowUpdate()
        {
            var columnAttribute = new ColumnAttribute("Foo", allowInsert: false, allowUpdate: true);

            Assert.Equal("Foo", columnAttribute.Name);
            Assert.False(columnAttribute.AllowInsert);
            Assert.True(columnAttribute.AllowUpdate);
        }
예제 #3
0
        public void ConstructorSetsNameAndDbTypeAllowInsertAndAllowUpdateToTrue()
        {
            var columnAttribute = new ColumnAttribute("ObjectID", DbType.Guid);

            Assert.Equal("ObjectID", columnAttribute.Name);
            Assert.Equal(DbType.Guid, columnAttribute.DbType);
            Assert.True(columnAttribute.AllowInsert);
            Assert.True(columnAttribute.AllowUpdate);
        }
예제 #4
0
        public void ConstructorSetsDbType()
        {
            var columnAttribute = new ColumnAttribute("ObjectID", DbType.Int32, true, true);

            Assert.Equal("ObjectID", columnAttribute.Name);
            Assert.Equal(DbType.Int32, columnAttribute.DbType);
            Assert.True(columnAttribute.AllowInsert);
            Assert.True(columnAttribute.AllowUpdate);
        }