Example #1
0
        public void Computed_is_set_on_column()
        {
            var columnBuilder = new ColumnBuilder();

            Assert.True(columnBuilder.Binary(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.Boolean(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.Byte(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.Decimal(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.Double(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.Guid(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.Single(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.Short(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.Int(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.Long(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.String(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.Time(defaultSql: "Sql", computed: true).IsComputed);
            Assert.True(columnBuilder.DateTimeOffset(defaultSql: "Sql", computed: true).IsComputed);
        }
 public static ColumnModel SByte(this ColumnBuilder c, bool?nullable = null, bool identity = false, byte?defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null, IDictionary <string, System.Data.Entity.Infrastructure.Annotations.AnnotationValues> annotations = null)
 {
     return(c.Byte(nullable, identity, defaultValue, defaultValueSql, name, storeType ?? "tinyint", annotations));
 }
Example #3
0
 public static ColumnModel Byte(this ColumnBuilder b, string comment = null, bool?nullable = null, bool identity = false, byte?defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null, IDictionary <string, AnnotationValues> annotations = null)
 {
     return(b.Byte(nullable, identity, defaultValue, defaultValueSql, name, storeType, annotations.AddComment(comment)));
 }