this is my stored procedure .how to write in linq
ALTER PROCEDURE [dbo].[HPMS_SelectDraftLOBReportByLOBId] (@LOBID nvarchar(20)=null ) As SET NOCOUNT ON; begin declare @err1 int begin transaction BEGIN Select * from DraftLOB where AssemblyId is not null and SessionId is not null and @LOBID IS NULL OR LOBId = @LOBID order by SrNo1, SrNo2, SrNo3 END
Jignesh TrivediPosted Apr 29, 2014, 1:32 AM
If you are EF user than please refer my article
http://www.c-sharpcorner.com/UploadFile/ff2f08/call-store-procedure-from-entity-framework/
hope this will help you.
Mukesh Kumar TiwariPosted Apr 29, 2014, 12:48 AM
just drag and drop store proc.. u write in SQL on DDBML file...
suppose the name of bdml file is Student_Data then you can call a store PROCEDURE like this..
Student_Data Stude = new VStudent_Data ();
var stud_Detail = stude.Name of store procedure...
stud_grid.datasource = stud_detail;
stud_grid.Databind();