Skip to content

Commit bc31060

Browse files
committed
#237 Reverted
Cannot use differently named parameters
1 parent ae655ed commit bc31060

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

EntityFramework.Reverse.POCO.Generator/EF.Reverse.POCO.Core.ttinclude

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3553,7 +3553,7 @@ SELECT SERVERPROPERTY('Edition') AS Edition,
35533553
var sb = new StringBuilder();
35543554
foreach (var p in sp.Parameters.OrderBy(x => x.Ordinal))
35553555
{
3556-
sb.AppendLine(string.Format(" var {0}Param = new System.Data.Entity.Core.Objects.ObjectParameter(\"{1}\" + guid, typeof({2})) {{ Value = {3} }};",
3556+
sb.AppendLine(string.Format(" var {0}Param = new System.Data.Entity.Core.Objects.ObjectParameter(\"{1}\", typeof({2})) {{ Value = {3} }};",
35573557
p.NameHumanCase,
35583558
p.Name.Substring(1),
35593559
p.PropertyType,

EntityFramework.Reverse.POCO.Generator/EF.Reverse.POCO.ttinclude

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,8 @@ if (IncludeTableValuedFunctions)
476476
[CodeFirstStoreFunctions.DbFunctionDetails(DatabaseSchema = "<#=sp.Schema#>")]
477477
public IQueryable<<#= spReturnClassName #>> <#= spExecName #>(<#=WriteStoredProcFunctionParams(sp, false)#>)
478478
{
479-
var guid = System.Guid.NewGuid().ToString("N");
480479
<#= WriteTableValuedFunctionDeclareSqlParameter(sp) #>
481-
return ((System.Data.Entity.Infrastructure.IObjectContextAdapter)this).ObjectContext.CreateQuery<<#=spReturnClassName#>>("[<#=DbContextName#>].[<#=sp.Name#>](<#= WriteStoredProcFunctionSqlAtParams(sp) #>" + guid + ")", <#= WriteTableValuedFunctionSqlParameterAnonymousArray(sp) #>);
480+
return ((System.Data.Entity.Infrastructure.IObjectContextAdapter)this).ObjectContext.CreateQuery<<#=spReturnClassName#>>("[<#=DbContextName#>].[<#=sp.Name#>](<#= WriteStoredProcFunctionSqlAtParams(sp) #>)", <#= WriteTableValuedFunctionSqlParameterAnonymousArray(sp) #>);
482481
}
483482

484483
<# } } }

0 commit comments

Comments
 (0)