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 Guid(this ColumnBuilder b, string comment = null, bool?nullable = null, bool identity = false, Guid?defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null, IDictionary <string, AnnotationValues> annotations = null)
 {
     return(b.Guid(nullable, identity, defaultValue, defaultValueSql, name, storeType, annotations.AddComment(comment)));
 }