I have a table in SQL Server, and I want to create a stored procedure to insert data for the table (UserInformation
).
I am new to this, so please give me the info how to create that stored procedure.
Create Stored Procedure
Create procedure MyProcedure
(@id varchar(20),@search varchar(20) ) -- these are the parameters to this procedure
as
begin
select * from yourTable where ID=@id
end
or ( Without Parameters )
Create procedure MyProcedure
as
begin
select * from yourTable where ID=10
end
calling a stored Procedure with Entity Framework
// tbl_CompMgmt is a class which look exctly like the result returned
var mgtList = db.ExecuteStoreQuery<tbl_CompMgmt>("exec GetSortedManagement @Companay_ID=" + compID).ToList();
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments