Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public static ColumnModel DateTimeOffset(this ColumnBuilder b, string comment = null, bool?nullable = null, byte?precision = null, DateTimeOffset?defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null, IDictionary <string, AnnotationValues> annotations = null)
 {
     return(b.DateTimeOffset(nullable, precision, defaultValue, defaultValueSql, name, storeType, annotations.AddComment(comment)));
 }