TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Writing your own LINQ provider

64 pointsby aashishkoiralaabout 11 years ago

7 comments

aashishkoiralaabout 11 years ago
OP here. I wanted to comment on the discussion around &quot;.NET vs. other things&quot; coversation that has started brewing here. I&#x27;m not one to hate on any environment or ecosystem. I do make fun of PHP or Java at times, but it&#x27;s all good-natured. Not to be too PC, but yes, every thing has its pros and cons.<p>Personally, however, I think C# as a language strikes the right balance in terms of power, ease-of-use, learnability and code readability. Even if you have a problem with Microsoft, I think it is wrong to let your &quot;MS-hate&quot; translate into &quot;C#-hate&quot;. It is a beautiful language and the open-source community around it is growing rapidly. The progress made by platform-independent endeavors (case in point Xamarin) is admirable.<p>In the unlikely scenario that all of programming were to converge into one language, I would want it to be an open-source, platform-independent version of C# (with maybe just a tad more constructs borrowed from the functional programming world).<p>P.S. I also think it is a mistake to lump C# and Java in the same bucket. Ten or more years ago, maybe. Today, they are VERY different.
评论 #7415348 未加载
Guillaume86about 11 years ago
Nice post, if you plan a writing a full featured provider I recommend using the ReLINQ framework: <a href="http://relinq.codeplex.com/" rel="nofollow">http:&#x2F;&#x2F;relinq.codeplex.com&#x2F;</a><p>I regret I didn&#x27;t knew about it when I wrote my first LINQ provider.
评论 #7414779 未加载
评论 #7414752 未加载
gum_ina_packageabout 11 years ago
Awesome stuff. As a side note, anyone else see a rise in .NET&#x2F;Microsoft related posts recently?
评论 #7414694 未加载
评论 #7415293 未加载
sidmkp96about 11 years ago
LINQ one of the most beautiful things in C# after extension methods!
评论 #7415659 未加载
评论 #7415105 未加载
theszabout 11 years ago
You can get away with providing your own classes and extension methods. I did that, my colleagues did that (floowing my attempt). We needed a LINQ access to a non-SQL (hypergraph) database, so basic LINQ wouldn&#x27;t do it.<p>You need to know how to parse function bodies and I strongly suggest algebraic types approach, e.g., using SpecificType v = genericTypedVar as SpecificType and checking if v != null. You have to write your own parametrized type supporting Where, Select, etc.<p>And you&#x27;re good to go.<p>It took me three days to write first LINQ-like thing.
评论 #7415216 未加载
aashishkoiralaabout 11 years ago
And just as we were talking about .NET in other environments and Mono and Xamarin, we hear the news about Microsoft in talks to acquire Xamarin. Interesting.
rip747about 11 years ago
LINQ makes moving from CFML to .NET a lot easier. in CFML you&#x27;re mostly working with queries and using LINQ makes you feel right at home.