1
Reply

iam implementing linq to sql using stored procedure

Sivakumar

Sivakumar

Aug 13 2015 7:37 AM
319
Hi,

iam implementing linq to sql using stored procedure to get the details

i write the code like this :
 
 
  public TeamData GetTeamDetails(int teamid)
{

var getteam= (from t in _DataContext.uspGetTeam where t.TeamID==teamid select new TeamData {TeamID=t.TeamID,TeamName=t.TeamName,TeamStatus=t.TeamStatus}).SingleOrDefault();
return getteam;
}
 
in this code i get a error  :
 
Error 1 'Kiwi.Service.DL.KiwiDataContext.uspGetTeam(int?)' is a 'method', which is not valid in the given context E:\Kiwi Project\service\Kiwi.Service.DL\DataAccess.cs 47 50 Kiwi.Service.DL

Answers (1)