Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>10.8.5</Version>
<Version>10.8.6</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<Title>OData Provider</Title>
<Description>The Odata Provider lets you fetch and map data from or to any OData endpoint.</Description>
Expand Down
37 changes: 17 additions & 20 deletions src/ODataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -460,26 +460,23 @@ private void AddPropertiesFromXMLReaderToTable(XmlReader xmlReader, Table table,
/// <returns></returns>
private static Type GetColumnType(string columnTypeString)
{
switch (columnTypeString)
{
case "Edm.String":
return typeof(string);
case "Edm.Guid":
return typeof(Guid);
case "Edm.Int32":
return typeof(int);
case "Edm.Decimal":
return typeof(decimal);
case "Edm.Stream":
return typeof(Stream);
case "Edm.Date":
return typeof(DateOnly);
case "Edm.DateTimeOffset":
return typeof(DateTime);
case "Edm.Boolean":
return typeof(bool);
}
return typeof(object);
return columnTypeString switch
{
"Edm.String" => typeof(string),
"Edm.Guid" => typeof(Guid),
"Edm.Int32" => typeof(int),
"Edm.Decimal" => typeof(decimal),
"Edm.Double" => typeof(double),
"Edm.Single" => typeof(Single),
"Edm.Int64" => typeof(long),
"Edm.Byte" => typeof(byte),
"Edm.Stream" => typeof(Stream),
"Edm.Date" => typeof(DateOnly),
"Edm.DateTimeOffset" => typeof(DateTime),
"Edm.DateTime" => typeof(DateTime),
"Edm.Boolean" => typeof(bool),
_ => typeof(object),
};
}

/// <inheritdoc />
Expand Down
Loading