Main

type

5 (blog/news article)

status

21 (imported old-v2, waiting for another import)

review version

0

cleanup version

0

pending deletion

0 (-)

created at

2025-11-12 09:14:05

updated at

2025-11-12 09:14:06

Address

url

https://blog.willbeattie.com/2008/10/linq-to-entities-dynamic-linq-to.html

url length

74

url crc

52305

url crc32

1930742865

location type

1 (url matches target location, page_location is empty)

canonical status

10 (verified canonical url)

canonical page id

2961820458

Source

domain id

42632151

domain tld

2211

domain parts

3

originating warc id

-

originating url

https://data.commoncrawl.org/crawl-data/CC-MAIN-2025-33/segments/1754151280029.61/warc/CC-MAIN-20250808131348-20250808161348-00839.warc.gz

source type

11 (CommonCrawl)

Server response

server ip

142.251.179.121

Publication date

2025-08-08 13:27:16

Fetch attempts

0

Original html size

135901

Normalized and saved size

43852

Content

title

LINQ to Entities - Dynamic LINQ to Entities AND,OR

excerpt

content

Recently I had an Advanced Search requirement which had to enable Users to specify a combination of fields to search for and the operator e.g. AND, OR and the type of comparison to do e.g. LIKE, EQUALS. The DataLayer is built upon the Entity Framework and I'm using LINQ to Entities as the query mechanism. So my overriding goal was to keep this Strongly Typed but maintainable as well. Firstly I created a generic SearchInfo object of which there would be one for each field that needed to be included in the search. public class SearchInfo<T> { public Expression<Func<T, object>> PropertySelector { get; set; } public QueryOperator Operator { get; set; } public StringComparer Comparer { get; set; } public string Value { get; set; } } public enum QueryOperator { And = 0, Or = 1 } public enum StringComparer { Equals = 0, StartsWith = 1, EndsWith = 2, Contains = 3 } Now if we just had to deal with the AND operator we could achieve this by condit...

author

updated

1764731755

Text analysis

block type

0

extracted fields

104

extracted bits

title
full content
content was extracted heuristically

detected location

0

detected language

1 (English)

category id

.NET (147)

index version

2025110801

paywall score

0

spam phrases

0

Text statistics

text nonlatin

0

text cyrillic

0

text characters

4317

text words

746

text unique words

273

text lines

1

text sentences

16

text paragraphs

1

text words per sentence

46

text matched phrases

1

text matched dictionaries

2