Lambda expression with empty paren ()

I came across code like:

var vpAlias = null;
var prices = session.QueryOver<Vehicle>()
    .Left.JoinAlias<VehiclePrice>(x => x.VehiclePrice, () => vpAlias, x => x.VehiclePriceTypeId == 1)
    .Where(() => vpAlias.Id == null || vpAlias.VehiclePriceTypeId == 1)
    .Select(x => x.Id, () => vpAlias.Price)
    .ToList();

that uses () in its lambda expressions. What does that mean ? Is it used just as a placeholder ?

Jon Skeet
people
quotationmark

It just means it's an empty parameter list - for delegate types which don't have any parameters.

The fact that you can write x => x.Id is really just a shorthand for (x) => x.Id which is in turn a shorthand for (Vehicle x) => x.Id. It's just a parameter list.

people

See more on this question at Stackoverflow