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 8058163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:16:00+00:00 2026-06-05T09:16:00+00:00

Does anyone have the faintest idea what this error means please and how to

  • 0

Does anyone have the faintest idea what this error means please and how to resolve it? All my research is drawing a blank, I can see how to set it on MSDN but it doesn’t explain it in a way that explains to me what the issue is. If I remove some of my LINQ queries to set viewbag items then it seems to resolve it but the moment I set new ones and pass them into my view to generate a mail for MVCMailer it comes back. Not sure if its a viewbag issue or simply that I am calling too many linq queries to generate them to pass to the view.

I am very stuck (again)……….

Cheers,
Steve.

DbLimitExpression requires a collection argument.
Parameter name: argument
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: DbLimitExpression requires a collection argument.
Parameter name: argument

An example of the code is:

            var VBSalutation = from A in context.Salutations
                where A.SalutationId == policytransaction.SalutationId
                select A.SalutationName;
        ViewBag.Salutation = VBSalutation.FirstOrDefault();

This is repeated for various parameters and then passed to the view.

  • 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-06-05T09:16:02+00:00Added an answer on June 5, 2026 at 9:16 am

    Well, I faced a similar problem and solved it. Problem was in WHERE clause: data type of left side equal operator (=) sign was not matching with data type of right side. So in your scenario:

    where A.SalutationId == policytransaction.SalutationId

    SalutationID of A might be an INT and SalutationId of policytransaction might be a string (This is how it was in my case).

    I solved it by assigning policytransaction.SalutationId to an Int variable and using it:

    int myIntVariable = Convert.ToInt16(policytransaction.SalutationId);
    ...//some code here
    where A.SalutationId == myIntVariable;
    

    Please also note that you cannot directly cast your variables directly in Linq else you’ll get an error “LINQ to Entities does not recognize the method”. You’ll have to use a temp variable and then apply the where clause.

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

Sidebar

Related Questions

Does anyone have a idea how to do this kind progress bar?
Does anyone have a solution for the following error? We can not add a
Does anyone have any idea how to change the thickness of the text pointer
Does anyone have any idea to track event of google analytics programatically in asp.net?
Does anyone have any idea why the following causes the program to crash? NSFileManager
Does anyone have a regex in ruby that can match and replace a tab
Does anyone have any idea why my server cannot read the database file? No
Does anyone have a modern CSS method for doing something like this? I've been
Does anyone have any suggestions for the best / simplest way to view all
Does anyone have the xaml to get the look and feel of this UI?

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.