none
How can i use Select Stored procedure in entity Framework Code first Approach in mvc RRS feed

  • Question

  • Hi  All,

    suppose i have  select stored procedure  like this

    CREATE PROCEDURE SelectUserPro
      @securityUserID int
    AS
    BEGIN

     select tblSecurityUser.securityUserID, (firstname + ' ' + lastname) as name from tblSecurityUserGroup inner join tblSecurityUser
     on tblSecurityUserGroup.securityUserID=tblSecurityUser.securityUserID where
     securityGroupID =(select securityGroupID from tblSecurityuserGroup where securityUserID = @securityUserID) AND
     tblSecurityUser.userType<>'G'
    END
    GO

    i want to use this procedure  in mvc code first approach  if it is possible  then how .  if not then how to convert this sql statement into LINQ query or Lambda expression

    • Moved by CoolDadTx Monday, September 14, 2015 1:57 PM EF related
    Monday, September 14, 2015 12:57 PM