Skip to content

Commit 8e6e5b9

Browse files
committed
Fixed IntersectInterfaces for UniqueIdentifierColumns and ManagedPropertyColumns
1 parent a0c7b0f commit 8e6e5b9

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

src/DataverseProxyGenerator.Core/Generation/Utilities/TypeSignatureHelper.cs

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,24 @@ public static string GetPropertyTypeSignature(ColumnModel column)
1313
{
1414
ArgumentNullException.ThrowIfNull(column);
1515

16-
return column.TypeName switch
16+
return column switch
1717
{
18-
"StringColumnModel" or "MemoColumnModel" => "string?",
19-
"IntegerColumnModel" => "int?",
20-
"BigIntColumnModel" => "long?",
21-
"BooleanColumnModel" => "bool?",
22-
"DateTimeColumnModel" => "DateTime?",
23-
"DecimalColumnModel" => "decimal?",
24-
"DoubleColumnModel" => "double?",
25-
"MoneyColumnModel" => "decimal?",
26-
"EnumColumnModel" => GetEnumTypeSignature((EnumColumnModel)column),
27-
"LookupColumnModel" => "EntityReference?",
28-
"PartyListColumnModel" => "IEnumerable<ActivityParty>",
29-
"FileColumnModel" or "ImageColumnModel" => "byte[]",
30-
"PrimaryIdColumnModel" => "Guid",
18+
StringColumnModel or MemoColumnModel => "string?",
19+
IntegerColumnModel => "int?",
20+
BigIntColumnModel => "long?",
21+
BooleanColumnModel => "bool?",
22+
DateTimeColumnModel => "DateTime?",
23+
DecimalColumnModel => "decimal?",
24+
DoubleColumnModel => "double?",
25+
MoneyColumnModel => "decimal?",
26+
EnumColumnModel enumColumnModel => GetEnumTypeSignature(enumColumnModel),
27+
LookupColumnModel => "EntityReference?",
28+
PartyListColumnModel => "IEnumerable<ActivityParty>",
29+
FileColumnModel or ImageColumnModel => "byte[]",
30+
PrimaryIdColumnModel => "Guid",
31+
BooleanManagedColumnModel => "BooleanManagedProperty",
32+
ManagedColumnModel managedColumnModel => $"ManagedProperty<{managedColumnModel.FullReturnType}>",
33+
UniqueIdentifierColumnModel => "Guid?",
3134
_ => "object",
3235
};
3336
}

0 commit comments

Comments
 (0)