How do I return a limited set of columns in a Castle ActiveRecord query?
-
21-08-2019 - |
Question
and have it map to a strongly typed object?
Suppose I have a entity Blog with Id,Name,Posted,IsUglyFace,YerMom
but I just only want/need Name and Posted columns. I tried to do something like:
IList blogs = repository.SimpleQuery("select Name, Posted from Blog");
This dumps out a ton more SQL and gives back an error, could not map to given object.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow