Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Working with stored procedure in LINQ?
  2. MyLinqsDataContext DataContext=new MyLinqsDataContext ();
  3.         int eno=Convert.ToInt32 (txtempno.Text );
  4.         int dep=Convert .ToInt32 (txtDep.Text );
  5.         var sqr = from qr in DataContext.USP_Insert_Emp(eno, txtName.Text, dep)
  6.       select qr;
  7.        
  8. create procedure USP_Insert_Emp(@empid int,@ename varchar(60),@deptid int)
  9. as
  10.  begin
  11.   insert into Emp (empid ,ename,deptid ) values (@empid ,@ename ,@deptid)
  12.  end