Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# MVC3 ASP.NET4.0
hi i am new to asp.net mvc3
how can i call a stored procedure in asp.net mvc3
if anybody knows plz give suggestion
 

[EDIT - moved from solution 2]
i'm doing it with linq to sql method, but didn't get how to call a stored procedure
[/EDIT]
Posted 15-Feb-12 0:15am
Edited 16-Feb-13 3:51am
Maciej Los151.9K
v2
Comments
Syed Salman Raza Zaidi at 15-Feb-12 5:26am
   
I am using NHibernate its easy to call stored procedure in it :)
sajan064 at 15-Feb-12 5:28am
   
plz tell how to use NHibernate and give me some links through which i can learn to call stored procedure
Syed Salman Raza Zaidi at 15-Feb-12 5:37am
   
check my updated solution
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

MVC is not responsible for the way you access your data. There are many technologies that you can use including
 
Plain old ADO.NET
LINQ to SQL
NHibernate
Entity Framework
 

NHibernate with SP[^]
 
NHibernate[^]
 
More[^]
  Permalink  
v2
Comments
adee.sidz at 15-Feb-12 5:46am
   
5up!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

i want to insert the data into database plz suggest how to insert using stored procedure
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hi There,
You can have a linq class to execute your stored procedure..
 
Try with LINQ class..
 
Go Ahead.. Smile | :)
  Permalink  
Comments
sajan064 at 15-Feb-12 5:21am
   
can you explain me the process how to call the store procedure ?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Hi,
 
Please check this link for executing SP in C# using LINQ
 
Thanks
-amit.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 381
1 Sergey Alexandrovich Kryukov 245
2 Marcin Kozub 225
3 Praneet Nadkar 217
4 /\jmot 189
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,614
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 16 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100