Skip to content

Conversation

@rstam
Copy link
Contributor

@rstam rstam commented Nov 10, 2025

No description provided.

@rstam rstam requested a review from a team as a code owner November 10, 2025 20:19
@rstam rstam added the feature Adds new user-facing functionality. label Nov 10, 2025
if (expression.IsNonDeterministic())
{
throw new ExpressionNotSupportedException(expression, because: $"non-deterministic field or property '{declaringType.Name}.{memberName}' should not be evaluated client-side and is not currently supported server-side");
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For non-deterministic expressions give a better error message saying why it isn't supported.

if (expression.IsNonDeterministic())
{
throw new ExpressionNotSupportedException(expression, because: $"non-deterministic method '{declaringType.Name}.{method.Name}' should not be evaluated client-side and is not currently supported server-side");
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For non-deterministic expressions give a better error message saying why it isn't supported.

var collection = Fixture.Collection;

var queryable = collection.AsQueryable()
.Select(x => DateTime.Now);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually these will be translated into server-side expressions, but that's a separate ticket.

@rstam rstam requested a review from BorisDog November 10, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Adds new user-facing functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant