I have the following function now i want to select only name and some other column from this method i have try this
private QueryOver<Request> CreateFilter(RequestFilterDTO filter)
{
var query = QueryOver.Of<Request>()
query.SelectList(list => list
.Select(pr => pr.Name)
.Select(pr => pr.Color)
.Select(pr => pr.ListPrice)
.List<Request>();
retu query;
}
This give me an error NHibeate.Criterion.Lambda.QueryOverProjectionBuilder<Optime.SWF.Model.Requests.Request> does not contain a definition for List and no extension method List accepting a first argument of type NHibeate.Criterion.Lambda.QueryOverProjectionBuilder<Optime.SWF.Model.Requests.Request> could be found (are you missing a using directive or an assembly reference?)
how i can fix this?
Note : The retu type i want to QueryOver<Request> with the selection then i send the createfilter method to my Base Repository
