• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

Given the following dbml.

How can I create a stored procedure?
Look at the image.
storedprocedurelinq.png
0
omegalove
Asked:
omegalove
  • 5
  • 2
1 Solution
 
AshokCommented:
I don't think you could do that.

Stored Procedure has to be created using (Database Tool) MS SQL Server (or Oracle), etc.
Once it is already created, you can use it in the DBML.

Ashok
0
 
omegaloveAuthor Commented:
k
0
 
AshokCommented:
BTW, I just realized that you could create new Stored Procedure using C# code.
As long as you have rights to create Stored Procedures (used login to the database connection must have rights).

Then you could write script to CREATE stored procedure and run from C# code.
I think it is better to use the right database tool because it would give better help finding error and correcting errors.

But if you have perfect code, you could use C# code to create Stored Procedures.

Ashok

0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
AshokCommented:
BTW, I just realized that you could create new Stored Procedure using C# code.
As long as you have rights to create Stored Procedures (user login to the database connection must have rights).

Then you could write script to CREATE stored procedure and run from C# code.
I think it is better to use the right database tool because it would give better help finding error and correcting errors.

But if you have perfect code, you could use C# code to create Stored Procedures.

Ashok
0
 
omegaloveAuthor Commented:
This ADO.NET and linq is not much of a big difference?
0
 
AshokCommented:
Linq-To-Sql uses ADO.NET behind the scene.

ADO.NET Entity model is different. How data is accessed is same, but how you write code is different.

If you want best (very interesting), see ONE HOUR Video @

http://www.silverlight.net/learn/videos/all/net-ria-services-intro/

Above video is made for Silverlight, but I think you could use same approach in ASP.NET applications.

HTH
Ashok
0
 
AshokCommented:
Make sure you spend one hour wathcing the video at above link first.  You will not regret it.

See this also, which proves that .NET RIA Services can be used without Silverlight.

http://hatim.indexdev.net/2009/03/27/getting-started-with-net-ria-services/

HTH
Ashok
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now