Avoiding NotSupportedException with IQueryable

Posted by: K. Scott Allen, on 20 Mar 2012 | View original | Bookmarked: 0 time(s)

Most remote LINQ providers can handle simple projections. For example, given a Movie class with lots of properties, and a MovieSummary class with a subset of those Movie properties, you can write a LINQ query like the following: var summaries = db.Movies.Select(m => new MovieSummary{ Title = m.Title, Length = m.Length }); But it all falls apart if you try to offload some of the work to a MovieSummary constructor. var db = new MovieDataStore(); var summaries = db.Movies.Select(m...

Category: XLinq | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1563 | Hits: 26

Similar Posts

  • ObjectQuery, LINQ to Entities and IQueryable more
  • Linq to Amazon source code more
  • Linq to Amazon implementation fore steps more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD