SELECT
[a].[SellBy]
, [a].[ProductName]
FROM
[dbo].[Products] AS [a]
WHERE
[a].[SellBy] = '2023-02-05T00:00:00.0000000'
I'm very new to using expressions directly but in my code to convert the OData filter I have
if (IsNullableType(left.Type) && !IsNullableType(right.Type))
{
if(right is ConstantExpression offset)
{
if(offset.Value is DateTimeOffset dateTimeOffset)
{
DateTime? dateTime = dateTimeOffset.DateTime;
right = ConstantExpression.Constant(dateTime, typeof(DateTime?));
}
}
}
SELECT
[a].[SellBy]
, [a].[ProductName]
FROM
[dbo].[Products] AS [a]
WHERE
[a].[SellBy] = '2023-02-05T00:00:00.0000000'
I'm very new to using expressions directly but in my code to convert the OData filter I have
if (IsNullableType(left.Type) && !IsNullableType(right.Type))
{
if(right is ConstantExpression offset)
{
if(offset.Value is DateTimeOffset dateTimeOffset)
{
DateTime? dateTime = dateTimeOffset.DateTime;
right = ConstantExpression.Constant(dateTime, typeof(DateTime?));
}
}
}