开发者

Does linq to sql make stored procedures in ms sql 2005?

开发者 https://www.devze.com 2023-01-03 16:40 出处:网络
I am looking through my stored procedures on my server and I got alot of them. The thing is I only made like 10 of the 100 there.

I am looking through my stored procedures on my server and I got alot of them. The thing is I only made like 10 of the 100 there.

These stored procedures are not system ones(that has its own folder).

They seem to be stored procedures for every table I have.

Example of one

USE [DB]
GO
/****** Object:  StoredProcedure [dbo].[usp_SomeDelete]    Script Date: 06/17/2010 11:58:39 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROC [dbo].[usp_SomeDelete] 
    @UserId uniqueidentifier
AS 
    SET NOCOUNT O开发者_如何学GoN 
    SET XACT_ABORT ON  

    BEGIN TRAN

    DELETE
    FROM   [dbo].[MyTable]
    WHERE  [UserId] = @UserId

    COMMIT


Looks like someone used a code generator to develop a business library. Linq to SQL runs dynamic SQL behind the scenes, and although you can utilize stored procedures, it does not create them.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号