Alper Ozcetin's is right you can map StoredProcedures in *.dbml and you can use StoredProcedures as Method.
Below is demo doing this with the AdventureWorks DB and works for both vs2008 and vs2010
Wtih AdventureWorks I created the following Proc
CREATE PROC sp_test (@City Nvarchar(60) , @AddressID int out )
AS
SELECT TOP 10 * FROM Person.Address where City = @City
select top 1 @AddressID = AddressID FROM Person.Address where City = @City
I then added sp_test to a dbml and wrote the following program
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq;
namespace Test
{
class Program
{
static void Main(string[] args)
{
DataClasses1DataContext dc = new DataClasses1DataContext("SomeSQLConnection);
int? AddressID = null;
ISingleResult<sp_testResult> result = dc.sp_test("Seattle", ref AddressID);
foreach (sp_testResult addr in result)
{
Console.WriteLine("{0} : {1}", addr.AddressID, addr.AddressLine1);
}
Console.WriteLine(AddressID);
}
}
}
This results in the following ouput
23 : 6657 Sand Pointe Lane
91 : 7166 Brock Lane
92 : 7126 Ending Ct.
93 : 4598 Manila Avenue
94 : 5666 Hazelnut Lane
95 : 1220 Bradford Way
96 : 5375 Clearland Circle
97 : 2639 Anchor Court
98 : 502 Alexander Pl.
99 : 5802 Ampersand Drive
13079
You'll notice that the input into the sp_test method is a ref