.Where(oh => oh.Hierarchy.Contains("/12/"))
You can also use .StartsWith()
or .EndsWith()
.
More Related Contents:
- LINQ to Entities does not recognize the method
- Linq to Entities – SQL “IN” clause
- Linq int to string
- Why use LINQ Join on a simple one-many relationship?
- Entity Framework 4 Single() vs First() vs FirstOrDefault()
- Which method performs better: .Any() vs .Count() > 0?
- LINQ: When to use SingleOrDefault vs. FirstOrDefault() with filtering criteria
- Like Operator in Entity Framework?
- Is it better to call ToList() or ToArray() in LINQ queries?
- LINQ to SQL Left Outer Join
- Why is LINQ JOIN so much faster than linking with WHERE?
- LINQ on the .NET 2.0 Runtime
- Wrap a delegate in an IEqualityComparer
- C# – code to order by a property using the property name as a string [duplicate]
- Why does a Linq Cast operation fail when I have an implicit cast defined?
- What’s a good way to trim all whitespace characters from a string in T-SQL without UDF and without CLR?
- .NET List Concat vs AddRange
- Using “GO” within a transaction
- Ignore namespaces in LINQ to XML
- LINQ to Entities does not recognize the method Int32 get_Item(Int32)
- TSQL md5 hash different to C# .NET md5
- LINQ, can’t join to string
- Why does IQueryable.All() return true on an empty collection?
- How to Convert LINQ Comprehension Query Syntax to Method Syntax using Lambda
- Why are some object properties UnaryExpression and others MemberExpression?
- How to perform merge sort using LINQ?
- Linq to Objects: does GroupBy preserve order of elements?
- The model backing the ‘ApplicationDbContext’ context has changed since the database was created
- How to return a page of results from SQL?
- Using a variable for table name in ‘From’ clause in SQL Server 2008