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

Commit bce850d

Browse files
committed
Modified the SP T4 for TSTransaction change
Modified the SP T4 for TSTransaction change
1 parent 9e6c8cb commit bce850d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/T4/OrmLite.SP.tt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ namespace <#=StoredProcedures #>
182182
private static DbParameter CreateNewParameter(DbCommand dbCommand, string paramName, object paramValue, ParameterDirection paramDirection, DbType paramType)
183183
{
184184
DbParameter param = dbCommand.CreateParameter();
185-
param.Direction = paramDirection;
186-
param.DbType = paramType;
187-
param.ParameterName = paramName;
185+
param.Direction = paramDirection;
186+
param.DbType = paramType;
187+
param.ParameterName = paramName;
188188
param.Value = paramValue;
189189
return param;
190190
}
@@ -193,9 +193,9 @@ namespace <#=StoredProcedures #>
193193
public static OrmLiteSPStatement <#=sp.Name#>(this IDbConnection dbConnection <#foreach(var param in sp.Parameters){#> , <#=param.NullableSysType#> <#=Inflector.MakeInitialLowerCase(param.Name)#> = null <#}#>)
194194
{
195195
DbCommand dbCommand = (DbCommand)dbConnection.CreateCommand();
196-
dbCommand.CommandText = "<#=sp.Name#>";
197-
dbCommand.CommandType = CommandType.StoredProcedure;
198-
dbCommand.Transaction = OrmLiteConfig.CurrentTransaction!= null ? (DbTransaction)OrmLiteConfig.CurrentTransaction : null;
196+
dbCommand.CommandText = "<#=sp.Name#>";
197+
dbCommand.CommandType = CommandType.StoredProcedure;
198+
dbCommand.Transaction = OrmLiteConfig.TSTransaction!= null ? (DbTransaction)OrmLiteConfig.TSTransaction : null;
199199
<#if (sp.Parameters.Count > 0) { foreach(var param in sp.Parameters){#>
200200
dbCommand.Parameters.Add(CreateNewParameter(dbCommand,"<#=param.Name#>",<#=Inflector.MakeInitialLowerCase(param.Name)#>,ParameterDirection.Input,<#=param.DbType#>));
201201
<#}#> <#}#>

0 commit comments

Comments
 (0)