LINQ to entity 返回多个结果集
利用entity framework 调用存储过程,返回多个结果集
现有情况: 已经可以调用存储过程,并且能返回单一结果集
存储过程如下:
--[user]表有几个字段:userID (主键),username,userBlog CREATE PROCEDURE [dbo].[TEST] @userID VARCHAR(080), @recordcount NUMERIC (010) OUTPUTASBEGIN 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);
现在只能取得第一个SQL的结果集,没办法取得第二个SQL的结果集 ef 支持调用stored proce返回Multiple Result Sets:
重新装了开发环境, .net framwork 4.5 entity framwork 6.0 vs2012 http:-//msdn-microsoft-com/en-us/data/jj691402
http:-//www-codeproject-com/Articles/675933/Returning-Multiple-Result-Sets-from-an-Entity-Fram
|