When I do a query that returns an anonymous type
var assets =
from Product p in Session.CreateLinq<Product>()
where bundles.Contains(p.ProductBundle)
select new {p.Asset, p.Asset.PropertyTbl};
Can I type the return to anything other than var?
You cannot* return an anonymous type because the caller would not know what type it is and wouldn’t be able to use it.
If you want to return the results, you can create objects of a non-anonymous type:
You can also use the Tuple type in .NET 4 if you don’t want to create a custom class for your values.
* This is not strictly true – it is possible but you should avoid doing it. Here is a link anyway if you really want to.