concept name parameter in category .net

appears as: named parameter, Named Parameters, named parameters
NHibernate in Action

This is an excerpt from Manning's book NHibernate in Action.

After preparing query q, you bind the identifier value to a named parameter, fname. The result is returned as a generic IList of User objects.

Using Named Parameters

Using named parameters, you can rewrite the earlier query as follows:

string queryString =
"from Item item where item.Description like :searchString";

The colon followed by a parameter name indicates a named parameter. Then you can use the IQuery interface to bind a value to the searchString parameter:

IList result = session.CreateQuery(queryString)
.SetString("searchString", searchString)
.List();

Because searchString is a user-supplied string variable, you use the SetString() method of the IQuery interface to bind it to the named parameter (searchString).