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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:41:35+00:00 2026-05-22T18:41:35+00:00

Here on this page, Scott Hanselman shows two examples from Micro-ORMs Dapper and Massive,

  • 0

Here on this page, Scott Hanselman shows two examples from Micro-ORMs Dapper and Massive, and the Massive-example caught my interested, because I don’t see how they could implement that syntax.

The example is as follows, where I’m going to break it over several lines instead of just one long one:

var tbl = new Products();
var products = tbl.All(where: "CategoryID = @0 AND UnitPrice > @1",
    orderBy: "ProductName", limit: 20, args: 5,20);
                                       ^----+---^
                                            |
                                            +-- this

How did they implement this syntax, allowing args to have multiple values? I’m assuming params-based arguments, because that’s the only thing that allows for that, but I don’t understand how they constructed the method to allow for that since it seems to me that all I try ends up complaining about named arguments and fixed position arguments are in the wrong order.

I tried a test-method like this:

public static void Test(string name, int age, params object[] args)
{
}

and then using named arguments:

Test(age: 40, name: "Lasse", args: 10, 25);

But all I get is this:

Named argument specifications must appear after all fixed arguments have been specified

so obviously that is wrong. Also I can’t see in the source anything that would allow for this but maybe I’m looking in the wrong place.

What am I missing here?

  • 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-22T18:41:36+00:00Added an answer on May 22, 2026 at 6:41 pm

    Actually I think that Mr. Hanselman showed some code that doesn’t compile (oops, did I really dare to say that?). I can only get it working like this:

     Test(age: 40, name: "Lasse", args: new object[] { 10, 25 });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been reading this page here from MSDN regarding the XOR operator and
Am I missing something here? I follow the instructions exactly on this page (and
Below is my code for use on this page: here $(document).ready(function(){ $('.jcarousel-skin-tango a').hover( function()
Here's the thing. I have a page in MVC. this page has a helper.
Okay so here's the situation. I have this page of data. After the data
Working with this page here. http://careersinmusic.com/index.aspx The RED BAR, should open a modal window.
Consider this page: http://losthobbit.net/temp/docking.html Here's the HTML: <html> <head> <title></title> </head> <body> <div style=position:
According to this page here if you have proper application binary and .dSYM file
I've posted this here , but thought it might deserve a question on its
Jeff Atwood wrote about this here , and while I understand the theoretical performance

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.