Welcome to Hardcode Sign in | Join | Help

July 2009 - Posts

In Linq to SQL the following works by issuing a second query, in Linq to Entities it does not (and this sucks):

  Shortcut sh = db.Shortcuts.First();
  int count = sh.Redirects.Where( r => r.ocurred < dt).Count();

You have to do the following instead:

  int count = db.Redirects.Where( r => r.shortid == sh.id && r.ocurred < dt).Count();

... for http://oracolulmeu.ro/ for the last Monday: 1K visits and 42K pageviews (same day).

S4H

So now we have or own url-shortener service: http://s4h.ro/. Give it a try !