Eswar Datta

Eswar Datta

  • NA
  • 115
  • 7.4k

Stored Procedure in MVC

Jun 12 2018 4:07 AM
I created two tables in sql-server
 
1. Employeedata contains employee details
2. Registration table.
 
Now i created StoredProcedure to insert data in to  Registration table it retreiving data from Employeedata table.
 
stored procedure
  1. CREATE procedure [dbo].[RegistrationInsert](  
  2. @empEmail nvarchar(max),  
  3. @password nvarchar (max)  
  4. )  
  5. as begin  
  6. insert into [Registration ] ([EmployeeName],[EmployeeEmail],[Password],[PhoneNumber],[Role],[EmployeeID])  
  7. select [EmployeeName],[EmployeeMailID],@password,[EmployeePhoneNumber],[EmployeeDesignation],[EmployeeID]  
  8. from [Employeedata ]  
  9. where [EmployeeMailID] = @empEmail  
  10. end  
  11. GO 
But i don't know how to call this procedure in MVC controller. 

Answers (3)