How to do SQL Like % in Linq?

前端 未结 14 1784
误落风尘
误落风尘 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:23

    I do always this:

    from h in OH
    where h.Hierarchy.Contains("/12/")
    select h
    

    I know I don't use the like statement but it's work fine in the background is this translated into a query with a like statement.

提交回复
热议问题