I'm using LINQ and stored procedures, but I'm having an issue on the stored procedure side. Every time I drag the stored procedure over to the dbml file it sets the return as an int, instead of a result. Below is the Code for the SPROC. USE [master]GO/****** Object: StoredProcedure [dbo].[GetEntities] Script Date: 10/12/2007 08:56:04 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER PROCEDURE [dbo].[GetEntities] @dbName nvarchar(5)ASDECLARE @SQL as nvarchar(200)SET @SQL = 'USE [' + @dbName + '] SELECT bankid, BankName FROM Entities'EXEC (@SQL)GO
Below is the Code that is placed in the DBML File.[Function(Name="dbo.GetEntities")] public ISingleResult<GetEntitiesResult> GetEntities([Parameter(DbType="NVarChar(7)")] string dbName) { IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), dbName); return ((ISingleResult<GetEntitiesResult>)(result.ReturnValue)); }
Any Ideas as to why I might be getting this discrepancy? Thanks,Josh