How to do SQL Like % in Linq?

前端 未结 14 1797
误落风尘
误落风尘 2020-11-22 13:46

I have a procedure in SQL that I am trying to turn into Linq:

SELECT O.Id, O.Name as Organization
FROM Organizations O
JOIN OrganizationsHierarchy OH ON O.Id         


        
14条回答
  •  情书的邮戳
    2020-11-22 14:25

    Try this, this works fine for me

    from record in context.Organization where record.Hierarchy.Contains(12) select record;
    

提交回复
热议问题