如何将数据分配给OneOrMany(Of DateTimeOffset?)数据结构

时间:2019-04-03 17:19:05

标签: asp.net .net vb.net

我的数据结构定义如下

website.datecreated as OneOrMany(Of DateTimeOffset?)
website.author As Values(Of Organization, Person))

如何为这些结构分配值?

背景:Schema.net - How to build using VB

答案

如何为Datetime偏移量分配值:

tsd.datecreated=#1/1/2019#
website.DateCreated = New OneOrMany(Of DateTimeOffset?)(New DateTimeOffset(tsd.dateCreated))

如何为OneOrMany结构分配值:

tsd.author="Sample Name here"
Dim personItem As New Person()
personItem.Name = New OneOrMany(Of String)?(tsd.author)
cwSchema.Author = New Values(Of Organization, Person)(New OneOrMany(Of Person)(personItem))

0 个答案:

没有答案