Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LINQ to SPROC

Status
Not open for further replies.

Mustari

Programmer
May 17, 2008
2
BA
Hi there, I have a problem using LINQ and Stored Procedures.
I created a SPROC (MyStoredProcedure) with this SQL code:

SELECT * FROM atable

And I also mapped the whole data base, and I added the SPROC through the LINQ to SQL designer to the DataContext. So when I try to use it in code like this:

DataContext dc = new DataContext();

var something = dc.MyStoredProcedure().ToList();

I get an compiling error that it cannot implicitly convert to a List...

I found the same example on a web site, and noone there had this problem like me...

Can anyone help?
 
I haven't played around with LINQ yet, but a lot of times the samples you see on a new technology like LINQ were written against a CTP or Beta release, and that specific feature might not have made it into the final version of the product.

Chip H.


____________________________________________________________________
www.chipholland.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top