IQueryResult vs. QueryResult<T>

Thread is closed for posting
2 posts, 0 answers
  1. tmlipinski
    tmlipinski avatar
    131 posts
    Member since:
    Dec 2006

    Posted 15 May 2009 Link to this post

    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)?

    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.
  2. Jan Blessenohl
    Jan Blessenohl avatar
    707 posts

    Posted 15 May 2009 Link to this post

    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.
Back to Top