日期:2014-05-20 浏览次数:20797 次
--[user]表有几个字段:userID (主键),username,userBlog
CREATE PROCEDURE [dbo].[TEST]
@userID VARCHAR(080),
@recordcount NUMERIC (010) OUTPUT
AS
BEGIN
Selete username
from [dbo].[user]
where userID= @userID;
Selete userBlog
from [dbo].[user]
where userID= @userID;
set @recordcount = @@ROWCOUNT;
END
DBEntities entity = new DBEntities()
var recordcount = new System.Data.Objects.ObjectParameter("recordcount", DbType.Int32);
var query = entity.TEST("admin",recordcount);