Data Type Identifiers
When you build LightSwitch extensions, you often need to use string identifiers to define data types. This table contains a list of valid identifiers that you can use.
LightSwitch Data Types |
---|
:Binary |
:Boolean |
:Byte |
:DateTime |
:Date |
:Decimal |
:Double |
:Guid |
:Int16 |
:Int32 |
:Int64 |
:SByte |
:Single |
:String |
:TimeSpan |
Microsoft.LightSwitch.Extensions:EmailAddress |
Microsoft.LightSwitch.Extensions:Image |
Microsoft.LightSwitch.Extensions:Money |
Microsoft.LightSwitch.Extensions:Percent |
Microsoft.LightSwitch.Extensions:PhoneNumber |
Microsoft.LightSwitch.Extensions:WebAddress |
The LightSwitch data types that begin with: and are not preceded with a namespace refer to types that belong to the Microsoft.LightSwitch namespace.
In Chapter 19, I showed you how to create a custom value control. To specify the data type that a custom control supports, you would edit its LSML metadata file and specify a data type from those shown in this table.
In Chapter 20, I showed you how to create a business type. Business types are based on basic LightSwitch data types. To define the underlying data type, you would edit the LSML metadata file for your business type and specify one of the basic data types from this table.