How can I convert this query to linq to entities with entity framework:
SELECT customer_id,
customer_name,
customer_code
FROM dbo.V_STF_CUSTOMER
WHERE company_id=@company_id AND
ORDER BY CASE
WHEN ISNUMERIC(customer_name)=1 THEN 1
ELSE 0
END,
customer_name
I have this:
return CUstomers.GetQuery().
Where(x => x.CompanyId == companyId).
OrderBy(??This is my problem??);
I don't know how to translate the orderby. Any idea?