This is a migrated thread and some comments may be shown as answers.

IQueryResult vs. QueryResult<T>

1 Answer 97 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
tmlipinski
Top achievements
Rank 1
tmlipinski asked on 15 May 2009, 11:47 AM
Hi,
What is the functional difference between the pair of instructions:
IQuery query = scope.GetOqlQuery(query text);  
IQueryResult res = query.Execute(parameters); 

and this one:
Query<mytype> query = scope.GetOqlQuery<mytype>(query text);  
QueryResult<mytype> res = query.Execute(parameters); 

Is it for strong typing only? Can an IQueryResult list be directly converted to a QueryResult<mytype> list (and vice versa)?

Regards
Tomasz
PS. Are these classes and interfaces explicitly defined in the documentation? As far as I can see thay are only used there but not explained in details.

1 Answer, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 15 May 2009, 05:04 PM
Hi tmlipinski,
The non generic call is comming from the our old .net 1.1 api and has been replaced by the generic one. You should use GetOqlQuery<T>. The calls execute calls returns typed lists then. If you use WinForm binding you should use ExecuteBindingList which gives you a BindingList back that can be bound to the UI directly.

The reference guide in the web is broken at the moment. Please look into you local installed version. 

Sincerely yours,
Jan Blessenohl
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
tmlipinski
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Share this question
or