Beispiel #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);
        }
Beispiel #2
0
 public static ColumnModel Decimal(this ColumnBuilder b, string comment = null, bool?nullable = null, byte?precision = null, byte?scale = null, decimal?defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null, bool identity = false, IDictionary <string, AnnotationValues> annotations = null)
 {
     return(b.Decimal(nullable, precision, scale, defaultValue, defaultValueSql, name, storeType, identity, annotations.AddComment(comment)));
 }