I have a linq query in mvc4 application it gives me error
'Unable to create a constant value of type 'CMMIS.Domain.tblCustomer'. Only primitive types or enumeration types are supported in this context.'
. Any help is appreciable. Thanks in advance. Following is my code-
public List<tblEquipment> getEquipmentByLaneAndContractId(string Lane, string contractId)
{
var query = (from c in _equipmentRepository.Table
from p in _customerRepository.Table
from q in _contractRepository.Table
where c.EquipLane == Lane && c.EquipActive == true && c.EquipCustID == p.CustID
&& p.CustContractID == q.ContractID && q.ContractID == contractId
select c).ToList();
return query;
}