I have a requirement where I need to use the select statement generated from a SqlExpression as a type of a key to store the data retrieved from the DB for each specific query.
The ToSelectStatement()
extension method on SqlExpression<T>
returns a parameterized select statement. Normally this works perfectly, but as a key this type of SQL will not work correctly as they key needs to be more specific:
WHERE ("ProfileUpdateRequest"."AppUserId" = @0)
Is there any built-in method somewhere which can replace the parameters with the actual values? Or is this something I must implement myself?