Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6647355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:31:39+00:00 2026-05-26T00:31:39+00:00

I am trying to run the linq statement below. I am getting the following

  • 0

I am trying to run the linq statement below. I am getting the following error message:

The specified type member ‘CustomerID’ is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.

I stepped through the code and it happens when I take query and attempt to convert using “ToList()”.

Any ideas? How would I rewrite this query so that LINQ to Entities stops complaining.

Steve

                var query = from l in db.QBPOLines
                            join t in db.tblJobTasks on l.POID equals t.PurchaseOrderID
                            join j in db.tblJobTasks on t.JobID equals j.JobID
                            join c in 
                            (
                                from c in db.tblCustomers
                                select new 
                                {
                                    c.CustomerID,
                                    PricingID = c.PricingID == null || c.PricingID == 0 ? 1 : c.PricingID
                                }
                            ) on j.CustomerID equals c.CustomerID
                            join m in db.QBItemsPriceMaps on l.Item equals m.ItemName
                            join s in db.tblCustomerPricingSchemes on c.CustomerID equals s.CustomerID into g1
                            from s in g1.DefaultIfEmpty()
                            join p in db.tblPricingSchemes on l.LangPairs equals p.PSLangPairID into g2
                            from p in g2.DefaultIfEmpty()
                            where t.JobID == jobID
                               && s.PSLangPairID == l.LangPairs
                               && p.PSDescID == c.PricingID
                            select new
                            {
                                j.JobID,
                                l.Item,
                                l.LangPairs,
                                l.Qty,
                                Rate = s.PSLangPairID != null 
                                    ? (m.CustomerPriceField == "PS_FZ50" ? s.PS_FZ50 :
                                       m.CustomerPriceField == "PS_FZ75" ? s.PS_FZ75 :
                                       m.CustomerPriceField == "PS_FZ85" ? s.PS_FZ85 :
                                       m.CustomerPriceField == "PS_FZ95" ? s.PS_FZ95 : null)

                                    : (m.CustomerPriceField == "PS_FZ50" ? p.PS_FZ50 :
                                       m.CustomerPriceField == "PS_FZ75" ? p.PS_FZ75 :
                                       m.CustomerPriceField == "PS_FZ85" ? p.PS_FZ85 :
                                       m.CustomerPriceField == "PS_FZ95" ? p.PS_FZ95 : null)
                            };

                List<tblJobManagementLineItem> list = query.ToList().ConvertAll(i => new tblJobManagementLineItem
                {
                    JobID = i.JobID,
                    LineItemDescr = i.Item,
                    LanguagePairID = i.LangPairs,
                    SourceWordCount = (int)i.Qty,
                    QtyToInvoice = (int)i.Qty,
                    //item.JobInvoiceID <--- Implement later
                    Rate = i.Rate
                });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:31:40+00:00Added an answer on May 26, 2026 at 12:31 am

    I believe the problem is that you can’t join on a collection of anonymous types.

    Move the PricingId property to a later let clause and join directly to Customers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run the Count() function of a Linq statement in an overriden
I'm getting this error: Only parameterless constructors and initializers are supported in LINQ to
I'm trying to run a LINQ to SQL query that returns a result in
I'm currently trying to run a LINQ query over a MS SQL database. This
Trying to run the following command in php to run powershell command... the following
Trying to run my program in FreeBSD OS, I have the following results: $
I am trying to run a Linq-to-SQL query, but when the query is evaluated,
I'm trying to run a Linq query on a datatable to produce a result,
I am fairly new to Linq To SQL but trying to run what should
I am trying to run a linq query using EF on .NET 3.5 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.