Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / August 2007

Tip: Looking for answers? Try searching our database.

Linq return data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan Puebla - 28 Aug 2007 22:20 GMT
Hi,

I'm trying to use Linq in a webservice that returns a data from a query. As
the data return from Linq to Sql is IEnumerable<T> and it's not possible to
easily get a Dataset, Which is the best format to return data?

Thanks
ronscottlangham@yahoo.com - 29 Aug 2007 03:54 GMT
On Aug 28, 4:20 pm, Juan Puebla <JuanPue...@discussions.microsoft.com>
wrote:
> Hi,
>
[quoted text clipped - 3 lines]
>
> Thanks

Assuming T is a value that can be serialized and returned from the web
service, I would recommend that you return T[].  Use Generics List to
turn the value into a list and then return the values as an array.

T[] GetValues()
{
     return new List<T>( .. IEnumerable<T> ).ToArray();
}

Ron

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.