Inheritance: System.Attribute
Ejemplo n.º 1
0
        public void ConstructorSetsNameDbTypeToNullAndAllowInsertAndAllowUpdateToTrue()
        {
            var columnAttribute = new ColumnAttribute("ObjectID");

            Assert.Equal("ObjectID", columnAttribute.Name);
            Assert.True(columnAttribute.AllowInsert);
            Assert.True(columnAttribute.AllowUpdate);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }