Click here to Skip to main content
14,332,266 members
Rate this:
Please Sign up or sign in to vote.
See more:
my code is look like below

 public List<teamdata> GetMemberTeams(int memberid)
        {
           var memberTeam = 
         
 ( from  m in _DataContext.MemberLogins
join tm in _DataContext.TeamMembers on m.MemberLoginID equals tm.MemberLoginID
join t in _DataContext.Teams on tm.TeamID equals t.TeamID
where  m.MemberID == memberid select new TeamData{TeamID=t.TeamID, TeamName= t.TeamName, TeamStatus=t.TeamStatus}).ToList();

           return GetMemberTeams(memberid);
        }


so am getting team details error comes
An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll
[edit]Code block added - OriginalGriff[/edit]
Posted
Updated 10-Aug-15 19:32pm
v2

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Um...
public List<teamdata> GetMemberTeams(int memberid)
    {
    ...
    return GetMemberTeams(memberid);
    }
I think you meant:
public teamdata GetMemberTeams(int memberid)
    {
    ...
    return memberTeam[memberid];
    }
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100