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
Prasad Bhagat
NA
516
234.3k
return output values from a stored procedure using EF?
Sep 21 2015 9:28 AM
Dear All,
How to retreve output values from procedure using Entityfremework ..have look on bellow code please
CREATE PROCEDURE [dbo].[DeleteFriend]
@FriendDeviceId VARCHAR(Max),
@DeviceId VARCHAR(Max)
AS
BEGIN
BEGIN TRY
DELETE FROM Friends
WHERE DeviceId = @DeviceId AND FriendDeviceId = @FriendDeviceId
DELETE FROM Friends
WHERE DeviceId = @FriendDeviceId AND FriendDeviceId = @DeviceId
DECLARE @NotificationMsg VARCHAR(MAX)
SET @NotificationMsg = ''
DECLARE @Name VARCHAR(100)
DECLARE @FriendRegistrationId VARCHAR(MAX)
DECLARE @FriendOS VARCHAR(20)
SELECT @Name = Name
FROM DeviceMaster
WHERE DeviceId = @DeviceId
SET @NotificationMsg = @Name + ' has deleted you from the group'
SELECT @FriendRegistrationId = RegistrationId,
@FriendOS = OS
FROM dbo.DeviceMaster
WHERE DeviceId = @FriendDeviceId
SELECT @NotificationMsg AS STATUSMSG, 1 AS STATUSIND, @FriendRegistrationId AS FriendRegistrationId, @FriendOS AS OS
--EXEC GetFriendsList @DeviceId
END TRY
BEGIN CATCH
SELECT ERROR_MESSAGE() AS STATUSMSG, -1 AS STATUSIND
END CATCH
END
Above proc returns some output data please how to retreve to frantend using entityfreamework
Reply
Answers (
5
)
.Net Mvc using C# entity framework.
How to change message format on Mail Message delivery Option