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
i Getting 'System.InvalidCastException' error
Aug 26 2015 2:27 AM
Hi,
I get an error like this :
An exception of type 'System.InvalidCastException' occurred in System.Data.dll but was not handled in user code
Additional information: Specified cast is not valid.
this is my table structure:
and my stored procedure is :
ALTER PROCEDURE [dbo].[uspGetAllTeamMembers](@TeamID INT)
AS
BEGIN
SELECT
tm.TeamID,
m.MemberID,
m.MemberName,
m.MemberStatus,
ml.MemberLoginName,
ml.MemberLoginID,
tm.MemberJoinedDate,
tm.MemberLeftDate
FROM TeamMember tm
INNER JOIN MemberLogin ml
ON tm.MemberLoginID = ml.MemberLoginID
INNER JOIN Member m
ON m.MemberID = ml.MemberID
WHERE tm.TeamID = @TeamID
END
this is my backend code like this :
public TeamMemberData GetAllTeamMembers(int teamID)
{
TeamMember getteammember = _DataContext.uspGetAllTeamMembers(teamID).SingleOrDefault();
return new TeamMemberData { TeamID=getteammember.TeamID, MemberLoginID=getteammember.MemberLoginID};
}
i want to get aa team members details based on teamid
please give me a help
Thank You
Reply
Answers (
4
)
To return the longest common Sub-String of two strings
In My API Controller Shows an Error