Search

You searched for the word(s): userid:811286

Matching Posts

  • Re: LINQ Issue: no supported translation to SQL

    Well, changing [quote user="chris.wall"] <code> ///This is the method in my Linq to SQL Repository public IQueryable GetNewsPosts() { return from n in _context.NewsPosts select new Business.NewsPost(n); } </code> [/quote] To be <code> return from n in _context.NewsPosts select new Business.NewsPost { ID = n.ID, Title = n.Title, Body = n.Body }; </code> It all works as expected now, I'm just not sure why it wouldn't work by passing "n" into the business
  • LINQ Issue: no supported translation to SQL

    I apologize in advance if this is the wrong forum to post this in, didn't see any forum's description mentioning LINQ. I am getting the following exception: The member '[MyBusinessClass].ID' has no supported translation to SQL. For starters, this isn't even a Linq to Sql class. Am I wrong to assume that I can plug an object into an IQueryable collection and query it as I would a database? Edit: When I try the following line of code everything works fine this._repository.GetNewsPosts
Page 1 of 1 (2 items)