Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
before in application , i used a function . i add it to my sqlserver --> database --> Programmabality ---> Function ---> Scalered-Value Function

C#
dbo.MyFunc(_txt.text);


but now i need this function in my project . its mvc4 web site . is it possible to use like that ? and where i should add this function? of course i did like application , but db.MyFunc() dose not recognize in my class.

so,my project is CodeFirst .
Posted

1 solution

You do not call a SQL function from C# like this.

Look at the following link to see how to do it.

http://stackoverflow.com/questions/1300052/how-can-i-call-a-sqlserver-function-from-vb-netor-c-is-there-some-syntax-li/3232556#3232556[^]

Btw, this is basic and I would suggest you to buy a good c# book and read it.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900