entity framework - How to create a stored procedure in SQL Server Management Studio -
i have table in sql server, , want create stored procedure insert data table (userinformation
).
i new this, please give me info how create stored procedure.
create stored procedure
create procedure myprocedure (@id varchar(20),@search varchar(20) ) -- these parameters procedure begin select * yourtable id=@id end
or ( without parameters )
create procedure myprocedure begin select * yourtable id=10 end
calling stored procedure entity framework
// tbl_compmgmt class exctly result returned var mgtlist = db.executestorequery<tbl_compmgmt>("exec getsortedmanagement @companay_id=" + compid).tolist();