0

我有一个用于获取用户详细信息的存储过程。其中有一个输入参数,即@UserName。这是我的存储过程

USE [Test]
GO
/****** Object:  StoredProcedure [dbo].[GetUserByUserName]    Script Date: 6/12/2013 6:59:49 PM  ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[GetUserByUserName]
(
    @UserName VARCHAR(100)
)
AS
BEGIN
SET NOCOUNT ON

BEGIN TRY
    SELECT      UserID,                 
                FirstName,
                LastName,
                UserName,
                Password,
                PasswordUpdateDate,
                MembershipType,
                IsActive
    FROM        Users
    WHERE       UserName = @UserName
END TRY
BEGIN CATCH
    EXEC ThrowError
END CATCH
END

我想在 WCF 中使用 Linq to Sql 执行此过程。我想在DataTable Object中返回结果。

4

0 回答 0