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

Method return type of a query from multiple tables

1 Answer 43 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.
Camilo
Top achievements
Rank 1
Camilo asked on 18 Oct 2012, 03:03 PM
Hello, how I can return a list of data when I extract information from multiple tables, I have a business layer which query data layer OppenAccess, the filing must obtain the list through the business layer, as would be the return an anonymous method without having to create a class that defines the return type. thanks

1 Answer, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 22 Oct 2012, 02:48 PM
Hi Camilo,

You could achieve this goal by using one of the following approaches:

  • Set the method’s return type to System.Object and later on cast the result of the method in caller;
  • Use a generic method;

You cannot declare method return value to be an explicit type of anonymous types.

Hope that helps.

All the best,
Damyan Bogoev
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
Tags
General Discussions
Asked by
Camilo
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Share this question
or