I have a class Client with many attributes, but for now i just need to select two of them:
Code:
IList results = session.Find("select clients.Code, clients.Name from ClientsEntity as clients where clients.Recomended_id = " + client.Id);
I'm having problems extracting the information cause i receive a object []. the results are correct but i don't know how to extract them to a datagrid. I know I can do find to the entity itself like this:
Code:
IList results = session.Find("from ClientsEntity as clients where clients.Recomended_id = " + client.Id);
Although, this will just solve my problem for now, cause later i will need to do very complex queries, including attributes from many tables at the same time.. This will result in a object[] variable again..
What's the best way to do what i want? I know that if i have an entity itself it would be easy.. I just needed to do a simple cast to the variable I want.. but what about getting custom data from the database? How can i access it in the C# code and display it then in a datagrid?
Thanks