I'm trying to execute this query but for some reason it doesn't like the fact that 2 strings are sitting beside each other, here's the query:
var FiveSecStatsQuery = from qai in connection.QuickAnalyzerInputs
join calP in connection.CalculatedPrices on qai.InputID equals calP.TradeID
where ***(qai.ClientName = clientName) && (qai.CurrencyPair = cur_pair)***
&& (calP.Description = PriceDescriptions.FiveSeconds) && (calP.Outcome != null)
select new
{
calP.Outcome
};
The error is : Operator '&&' cannot be applied to operands of type 'string' and 'string'
Why is it giving me this error? Both ClientName and CurrencyPair are of type string in the database. The error occurs where the asterisks are
You need double ==
, not single =
so your where
clause should be:
where (qai.ClientName == clientName) && (qai.CurrencyPair == cur_pair)
&& (calP.Description == PriceDescriptions.FiveSeconds) && (calP.Outcome != null)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments