tags:

views:

17

answers:

1
+2  A: 

You need to separate out the query performed in the database from the processing to be done in process. Try this:

var newslist = db.News
                 // First do a select in SQL
                 .Select(p => new {p.NewsId, p.Title, p.ReleaseDate})
                 .AsEnumerable() // Do the rest in process
                 .Select(p => new {p.NewsId, p.Title, 
                         tarikh = MD.Utility.ToSpecialDate(p.ReleaseDate) });
Jon Skeet