I am struggling to find a workaround for this issue. LINQ to Entities does not allow to use ToString() method
I am trying to use the following Query
return (from buy in context.ContractBuys
where (buy.DealerNo.Value.ToString().StartsWith(dlrNo)) &&
(buy.CreationDate >= createDateFrom) && (buy.CreationDate <= createDateTo)
select buy).ToList();
dlrNo is a string type. but buy.DealerNo is a Nullable int in C#. Can I use the Like operator?