TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sivakumar
NA
551
217.8k
How can i get multiple table values using id
Aug 24 2015 8:01 AM
Hi, how can get values from multiple tables based on id using stored procedure
this is my tables :
i want to get TeamMember Details using TeamId.using linq to sql stored procedure.
this is my stored procedure:
GO
ALTER PROCEDURE [dbo].[uspGetAllTeamMembers](@TeamID INT)
AS
BEGIN
SELECT m.MemberID,
m.MemberName,
m.MemberStatus,
ml.MemberLoginName,
tm.MemberJoinedDate,
tm.MemberLeftDate
FROM TeamMember tm
INNER JOIN MemberLogin ml
ON tm.MemberLoginID = ml.MemberLoginID
INNER JOIN Member m
ON m.MemberID = ml.MemberLoginID
WHERE tm.TeamID = @TeamID
END
and backend code is like this :
public TeamMemberData GetAllTeamMembers(int teamid)
{
Member getteammember = _DataContext.uspGetAllTeamMembers(teamid).SingleOrDefault();
return new TeamMemberData { MemberName=getteammember.MemberName, MemberLoginID=getteammember.};
}
this is correct if not give me a help please.
Reply
Answers (
6
)
How get webpage value (has no ID) to label in WPF?
Reverse the odd words using c# [URGENT PLEASE]