-1

Possible Duplicate:
How to use SQL user defined functions in .NET?

Say I have created a SQL Server function function1(int a,int b) in my database, now how can I call this function in MVC3 controller ?

Community
  • 1
  • 1
  • 3
    I think you should do that in model, not in controller. Model consists of application data and the controller mediates input, converting it to commands for the model or view. – Pablo Claus Jul 04 '12 at 20:15
  • Pabloker is correct. You call the function in your SQL. And your SQL comprises the model. – paulsm4 Jul 04 '12 at 20:33

1 Answers1

0

You would use either ADO.NET or any one of many other database technologies.

bluevector
  • 3,485
  • 1
  • 15
  • 18
  • Then you want to [do this](http://stackoverflow.com/questions/8051299/how-to-add-sql-user-defined-function-to-entity-framework) – bluevector Jul 04 '12 at 20:51