public object GetAll(Reqstars request) //Allow any typed Request DTO
 {
     using (var db = DbFactory.Open())
     {
         return(new ReqstarsResponse //matches ReqstarsResponse.cshtml razor view
         {
             Aged = request.Age,
             Total = db.GetScalar <int>("select count(*) from Reqstar"),
             Results = request.Age.HasValue ?
                       db.Select <Reqstar>(q => q.Age == request.Age.Value)
                   : db.Select <Reqstar>()
         });
     }
 }
 public object GetAll(Reqstars request)
 {
     using (var db = DbFactory.Open())
     {
         return new ReqstarsResponse //matches ReqstarsResponse.cshtml razor view
         {
             Aged = request.Age,
             Total = db.GetScalar<int>("select count(*) from Reqstar"),
             Results = request.Age.HasValue ?
                 db.Select<Reqstar>(q => q.Age == request.Age.Value)
                   : db.Select<Reqstar>()
         };
     }
 }