score:16
Accepted answer
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)
score:4
Change (qai.ClientName = clientName) && (qai.CurrencyPair = cur_pair)
to (qai.ClientName == clientName) && (qai.CurrencyPair == cur_pair)
since its boolean operation not value assignment
Source: stackoverflow.com
Related Articles
- LINQ Operator '==' cannot be applied to operands of type 'method group' and 'int'
- Operator '==' cannot be applied to operands of type 'System.Guid' and 'string' in linq to entity
- Operator >= cannot be applied to operands of type string and datetime
- C# Linq use Where with IsNull() Operator '&&' cannot be applied to operands of type 'bool' and 'int?'
- Converting SQL query to LINQ -- Operator '&&' cannot be applied to operands of type 'int' and 'bool'
- How to solve this Error in Linq : Operator '!=' cannot be applied to operands of type 'int' and 'System.Linq.IQueryable<int>'
- operator '&&' cannot be applied to operands of type 'int' and 'bool' linq
- Operator '??' cannot be applied to operands of type 'int' and 'int'
- Operator '==' cannot be applied to operands of type 'int' and 'string'
- Operator '&&' cannot be applied to operands of type 'bool' and 'bool?'
- Operator '||' cannot be applied to operands of type 'lambda expression' and 'lambda expression'
- Operator '==' cannot be applied to operands of type 'int' and 'System.Linq.iQueryable<int>'
- Operator '==' cannot be applied to operands of type 'method group' and 'string'
- WPF C# LINQ: Operator '&&' cannot be applied to operands of type 'string' and 'string' query
- Operator '!=' cannot be applied to operands of type 'bool?' and 'int'
- Operator '||' cannot be applied to operands of type 'string' and 'bool'
- Operator '>' cannot be applied to operands of type 'string' and 'string' in query
- Expression<Func< - Operator '||' cannot be applied to operands of type 'lambda expression' and 'lambda expression'
- Operator '==' cannot be applied to operands of type 'KeyValuePair' and 'string'?
- Operand '==' cannot be applied for operands of type bool and string
- Operator '??' cannot be applied to operands of type 'System.Guid?' and 'string'
- Operator && cannot be applied to operands of type decimal and decimal
- operator '||' cannot be applied to operands of type 'string' and 'string' ( how i can fix this )
- LINQ Conditional Sum Calculation - cannot be applied to operands of type 'int' and 'bool'
- Operator '&&' cannot be applied to operands of type 'bool' and 'System.Collections.Generic.IEnumerable<Feature>'
- c# - Linq Error "Operator '==' cannot be applied to operands of type 'int' and 'System.Linq.IQueryable<T>" and RemoveRange
- getting error cannot apply operator to operands of type system.datetime and string
- operator '==' cannot be applied to operands of type 'int?' and 'object' ASP.NET MVC
- Operator '&&' cannot be applied to operands of type List<> and List<>
- Linq: Operator '/' cannot be applied to operands of type 'object' and 'object'
- How to select an id from a xml element with linq
- How to check "Is Nothing" in Linq dynamic query
- Get Row with Min Date in LINQ?
- Linq query built in foreach loop always takes parameter value from last iteration
- How to apply order by to linq query?
- Does Apache.Ignite.Linq support async/await?
- Speeding up iterating through two foreach loops
- Querying Linq to xml with an incomplete value
- XElement .Value swallows embedded XML
- Not able to Select after using Expression Tree in Group By
- Comparing Two Lists of Same User Defined Type
- How to Bind SiteMap Treeview datasource using c#
- Byte to string for hash function?
- Building an entity join LINQ query
- Retrieve the last 5 years data using Entity Framework Linq
- Complex WHERE clause on an array in Azure DocumentDb
- Check if each object of list is present in another list
- Can I get a Func object for an Extension method
- How can I update ObservableCollection by its ID using C#?
- I have a LINQ statement that is partially query and partially method. How can I do this using one or the other?