Database types
Last updated
[Database]
public abstract class Item
{
public abstract DateTime Value { get; set; }
public void TestDateTimeValues()
{
var v = new DateTime(DateTime.Now.Ticks, DateTimeKind.Local);
// The value and the kind are converted into UTC when the CLR type
// is converted to a database type, which happens here:
this.Value = v;
var kindAfter = this.Value.Kind; // System.DateTimeKind.Utc
}
}public abstract class Item
{
// This defines a nullable binary property.
// It is supported by Starcounter.
public abstract Binary? NonNullBinary { get; set; }
// This defines a not nullable binary property.
// It is not yet supported by Starcounter.
public abstract Binary NonNullBinary { get; set; }
}