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
I'm not entirely sure what's breaking here on this page: http://grandoaks.org/floor.html but it seems
So I have this page here: http://www.eminentmedia.com/development/powercity/ As you can see when you mouse
If you look on this page here in Firefox (I'm on 3.5.2 on a
http://steph.net23.net/work.php here is my test link. This page has a jquery script in it
Here is my scenario. User fills out this large page which is dynamically created
This one is driving me crazy. Here's the XAML: <UserControl x:Class=SilverlightApplication1.Page xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml> <Grid
Maddening problem here. When my page loads: <body onload=getClientDateTime();> It runs this function: document.getElementById('ClientDateTime').value=hello
Here is function , <script type=text/javascript> $(document).ready(function() { getRecordspage(1, 5); $(a.page-numbers).click(function() { alert(1); getRecordspage($(this).text(),
On this page here: http://mrwgrp.com/index.php When you rollover the images in the header you

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.