Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 03500a4

Browse files
committed
Fix for SP names with spaces
Fix for SP names with spaces and removed unwanted variables
1 parent 1aa6f6d commit 03500a4

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/T4/OrmLite.Core.ttinclude

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2590,4 +2590,4 @@ class Manager {
25902590
/*
25912591
End of Manager.tt
25922592
*/
2593-
#>
2593+
#>

src/T4/OrmLite.SP.tt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Settings
44
ConnectionStringName = ""; // Uses last connection string in config if not specified
55
var SPNamespace = "StoredProcedures";
6-
RepoName = "";
76
ClassPrefix = "";
87
ClassSuffix = "";
98

@@ -16,17 +15,15 @@
1615
#>
1716
<#
1817
if (string.IsNullOrEmpty(SPNamespace)) SPNamespace=ConnectionStringName;
19-
if (string.IsNullOrEmpty(RepoName) && !string.IsNullOrEmpty(ConnectionStringName)) RepoName=ConnectionStringName + "DB";
2018
if (string.IsNullOrEmpty(SPNamespace)) Namespace="StoredProcedures";
21-
if (string.IsNullOrEmpty(RepoName)) RepoName="PocoDB";
2219
#>
2320
using System;
2421
using System.Data.Common;
2522
using System.Data;
2623
using System.Collections.Generic;
2724
using ServiceStack.OrmLite;
2825

29-
namespace <#=StoredProcedures #>
26+
namespace <#=SPNamespace#>
3027
{
3128
public static class SPList
3229
{
@@ -41,7 +38,7 @@ namespace <#=StoredProcedures #>
4138
}
4239

4340
<#foreach(var sp in sps){#>
44-
public static OrmLiteSPStatement <#=sp.Name#>(this IDbConnection dbConnection <#foreach(var param in sp.Parameters){#> , <#=param.NullableSysType#> <#=Inflector.MakeInitialLowerCase(param.Name)#> = null <#}#>)
41+
public static OrmLiteSPStatement <#=sp.CleanName#>(this IDbConnection dbConnection <#foreach(var param in sp.Parameters){#> , <#=param.NullableSysType#> <#=Inflector.MakeInitialLowerCase(param.Name)#> = null <#}#>)
4542
{
4643
DbCommand dbCommand = (DbCommand)dbConnection.CreateCommand();
4744
dbCommand.CommandText = "<#=sp.Name#>";

0 commit comments

Comments
 (0)