Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

smithsson68@gmail.com
Jun 9, 2010
  6245
(1 votes)

Dynamic Data Store : The saga of the missing methods

If I received 1 Swedish Crown for every time someone asked or complained about why the DDS does not implement FirstOrDefault() in its Linq stack (along with First(), Last() and LastOrDefault()) then I would have at least 40 Swedish Crowns and would retire to the Bahamas (or Västerås)

The truth is that these methods return a single item as opposed to an IEnumerable and therefore require a whole new implementation path. In an ideal world this would have been done for CMS 6 but unfortunately wasn’t. Until it is done there is a very easy workaround.

See Jonas Bergqvist’s workaround here which uses Take and Reverse to achieve the same goals.

Jun 09, 2010

Comments

Sep 21, 2010 10:33 AM

Thanks for mentioning Västerås!!! In Västerås the weather is always hot and humid and it never rains. The girls are beautiful and the beer is always for free.

... and by the way - interesting posting!
/ Dan Jansson

Please login to comment.
Latest blogs
Optimizely Unit Testing Using CmsContentScaffolding Package

Introduction Unit tests shouldn't be created just for business logic, but also for the content and rules defined for content creation (available...

MilosR | Apr 26, 2024

Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog